@powerduck/md-editor 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -10
- package/dist/index.mjs +264 -239
- package/dist/plugins/mention.d.ts +11 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EditorView } from "@codemirror/view";
|
|
2
|
+
import type { MarkdownIt } from "markdown-it";
|
|
2
3
|
/**
|
|
3
4
|
* A single item in the @mention dropdown.
|
|
4
5
|
*/
|
|
@@ -73,3 +74,13 @@ export declare class MentionController {
|
|
|
73
74
|
hide(): void;
|
|
74
75
|
destroy(): void;
|
|
75
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Render `@username` in the preview as a styled mention badge.
|
|
79
|
+
*
|
|
80
|
+
* - Matches @ followed by word chars / hyphens.
|
|
81
|
+
* - Does NOT match email addresses (the char before @ must not be a word
|
|
82
|
+
* char or dot, so "user@example.com" is left alone).
|
|
83
|
+
* - Does not match inside code spans / code fences (markdown-it inline
|
|
84
|
+
* rules naturally skip those).
|
|
85
|
+
*/
|
|
86
|
+
export declare function useMentionRender(md: MarkdownIt): void;
|