@powerduck/md-editor 0.9.5 → 0.10.2
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/Editor.d.ts +2 -0
- package/dist/index.cjs +62 -14
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +1164 -1001
- package/dist/perf/IncrementalRenderer.d.ts +1 -0
- package/dist/plugins/mention.d.ts +8 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,9 @@ export interface MentionOptions {
|
|
|
27
27
|
onMentionSearch?: (query: string) => MentionItem[] | Promise<MentionItem[]>;
|
|
28
28
|
/**
|
|
29
29
|
* Hook called when an item is selected. Return the text to insert at the
|
|
30
|
-
* cursor (replacing the @query). If not provided, defaults to
|
|
30
|
+
* cursor (replacing the @query). If not provided, defaults to
|
|
31
|
+
* `[@label](mention:id)` so the renderer can distinguish real mentions
|
|
32
|
+
* from plain @text in prose.
|
|
31
33
|
*/
|
|
32
34
|
onMentionSelect?: (item: MentionItem) => string;
|
|
33
35
|
/** Minimum query length before showing dropdown. Default: 0 (show on @). */
|
|
@@ -75,12 +77,11 @@ export declare class MentionController {
|
|
|
75
77
|
destroy(): void;
|
|
76
78
|
}
|
|
77
79
|
/**
|
|
78
|
-
* Render
|
|
80
|
+
* Render `[@label](mention:user-id)` in the preview as a styled mention badge.
|
|
79
81
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* rules naturally skip those).
|
|
82
|
+
* Uses the standard markdown link syntax with a `mention:` URI scheme so that
|
|
83
|
+
* plain `@text` in prose (e.g. "@media", "@deprecated", email addresses) is
|
|
84
|
+
* never mistaken for a mention. Only links whose href starts with `mention:`
|
|
85
|
+
* are converted to badges; all other links render normally.
|
|
85
86
|
*/
|
|
86
87
|
export declare function useMentionRender(md: MarkdownIt): void;
|