@linker-design-plus/tiny-peony 1.4.35 → 1.4.36
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/foundation/contentManager/contentManager.d.ts +16 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +97 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5242 -3861
- package/dist/index.mjs.map +1 -1
- package/dist/intersection/components/editor/context.d.ts +3 -0
- package/dist/intersection/components/editor/editor.d.ts +6 -0
- package/dist/intersection/components/editor/index.d.ts +18 -0
- package/dist/intersection/hooks/use-editor.d.ts +3 -0
- package/dist/typings/status/i-content-manager.d.ts +3 -0
- package/package.json +2 -1
|
@@ -26,6 +26,9 @@ export interface EditorContext {
|
|
|
26
26
|
editorAction: Ref<EditorAction | undefined>;
|
|
27
27
|
getContent: (options?: ContentOptions) => string;
|
|
28
28
|
setContent: (content: string) => void;
|
|
29
|
+
setMarkdown: (markdown: string) => void;
|
|
30
|
+
appendMarkdown: (markdown: string) => void;
|
|
31
|
+
getMarkdownContent: () => string;
|
|
29
32
|
appendContent: (content: string | string[]) => void;
|
|
30
33
|
getTextContent: () => string[];
|
|
31
34
|
insertContent: (content: string | Node) => void;
|
|
@@ -84,6 +84,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
84
84
|
innerRender: () => JSX.Element;
|
|
85
85
|
innerGetContent: (_options?: ContentOptions) => string;
|
|
86
86
|
innerSetContent: (content: string) => Promise<void>;
|
|
87
|
+
innerSetMarkdown: (markdown: string) => Promise<void>;
|
|
88
|
+
innerAppendMarkdown: (markdown: string) => Promise<void>;
|
|
89
|
+
innerGetMarkdownContent: () => string;
|
|
87
90
|
innerAppendContent: (content: string | string[]) => Promise<void>;
|
|
88
91
|
innerGetTextContent: () => string[];
|
|
89
92
|
innerInsertContent: (content: string | Node) => void;
|
|
@@ -109,6 +112,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
109
112
|
getHtml(options: ContentOptions): string;
|
|
110
113
|
setContent(content: string): Promise<void>;
|
|
111
114
|
setHtml(content: string): Promise<void>;
|
|
115
|
+
setMarkdown(markdown: string): Promise<void>;
|
|
116
|
+
appendMarkdown(markdown: string): Promise<void>;
|
|
117
|
+
getMarkdownContent(): string;
|
|
112
118
|
appendContent(content: string | string[]): Promise<void>;
|
|
113
119
|
getTextContent(): string[];
|
|
114
120
|
insertContent(content: string | Node): void;
|
|
@@ -82,6 +82,9 @@ declare const EditorContainer: {
|
|
|
82
82
|
innerRender: () => import("vue/jsx-runtime").JSX.Element;
|
|
83
83
|
innerGetContent: (_options?: import("./context").ContentOptions) => string;
|
|
84
84
|
innerSetContent: (content: string) => Promise<void>;
|
|
85
|
+
innerSetMarkdown: (markdown: string) => Promise<void>;
|
|
86
|
+
innerAppendMarkdown: (markdown: string) => Promise<void>;
|
|
87
|
+
innerGetMarkdownContent: () => string;
|
|
85
88
|
innerAppendContent: (content: string | string[]) => Promise<void>;
|
|
86
89
|
innerGetTextContent: () => string[];
|
|
87
90
|
innerInsertContent: (content: string | Node) => void;
|
|
@@ -107,6 +110,9 @@ declare const EditorContainer: {
|
|
|
107
110
|
getHtml(options: import("./context").ContentOptions): string;
|
|
108
111
|
setContent(content: string): Promise<void>;
|
|
109
112
|
setHtml(content: string): Promise<void>;
|
|
113
|
+
setMarkdown(markdown: string): Promise<void>;
|
|
114
|
+
appendMarkdown(markdown: string): Promise<void>;
|
|
115
|
+
getMarkdownContent(): string;
|
|
110
116
|
appendContent(content: string | string[]): Promise<void>;
|
|
111
117
|
getTextContent(): string[];
|
|
112
118
|
insertContent(content: string | Node): void;
|
|
@@ -239,6 +245,9 @@ declare const EditorContainer: {
|
|
|
239
245
|
innerRender: () => import("vue/jsx-runtime").JSX.Element;
|
|
240
246
|
innerGetContent: (_options?: import("./context").ContentOptions) => string;
|
|
241
247
|
innerSetContent: (content: string) => Promise<void>;
|
|
248
|
+
innerSetMarkdown: (markdown: string) => Promise<void>;
|
|
249
|
+
innerAppendMarkdown: (markdown: string) => Promise<void>;
|
|
250
|
+
innerGetMarkdownContent: () => string;
|
|
242
251
|
innerAppendContent: (content: string | string[]) => Promise<void>;
|
|
243
252
|
innerGetTextContent: () => string[];
|
|
244
253
|
innerInsertContent: (content: string | Node) => void;
|
|
@@ -264,6 +273,9 @@ declare const EditorContainer: {
|
|
|
264
273
|
getHtml(options: import("./context").ContentOptions): string;
|
|
265
274
|
setContent(content: string): Promise<void>;
|
|
266
275
|
setHtml(content: string): Promise<void>;
|
|
276
|
+
setMarkdown(markdown: string): Promise<void>;
|
|
277
|
+
appendMarkdown(markdown: string): Promise<void>;
|
|
278
|
+
getMarkdownContent(): string;
|
|
267
279
|
appendContent(content: string | string[]): Promise<void>;
|
|
268
280
|
getTextContent(): string[];
|
|
269
281
|
insertContent(content: string | Node): void;
|
|
@@ -386,6 +398,9 @@ declare const EditorContainer: {
|
|
|
386
398
|
innerRender: () => import("vue/jsx-runtime").JSX.Element;
|
|
387
399
|
innerGetContent: (_options?: import("./context").ContentOptions) => string;
|
|
388
400
|
innerSetContent: (content: string) => Promise<void>;
|
|
401
|
+
innerSetMarkdown: (markdown: string) => Promise<void>;
|
|
402
|
+
innerAppendMarkdown: (markdown: string) => Promise<void>;
|
|
403
|
+
innerGetMarkdownContent: () => string;
|
|
389
404
|
innerAppendContent: (content: string | string[]) => Promise<void>;
|
|
390
405
|
innerGetTextContent: () => string[];
|
|
391
406
|
innerInsertContent: (content: string | Node) => void;
|
|
@@ -411,6 +426,9 @@ declare const EditorContainer: {
|
|
|
411
426
|
getHtml(options: import("./context").ContentOptions): string;
|
|
412
427
|
setContent(content: string): Promise<void>;
|
|
413
428
|
setHtml(content: string): Promise<void>;
|
|
429
|
+
setMarkdown(markdown: string): Promise<void>;
|
|
430
|
+
appendMarkdown(markdown: string): Promise<void>;
|
|
431
|
+
getMarkdownContent(): string;
|
|
414
432
|
appendContent(content: string | string[]): Promise<void>;
|
|
415
433
|
getTextContent(): string[];
|
|
416
434
|
insertContent(content: string | Node): void;
|
|
@@ -35,6 +35,9 @@ export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props:
|
|
|
35
35
|
hasPausationTag: Ref<boolean, boolean>;
|
|
36
36
|
getContent: (_options?: ContentOptions) => string;
|
|
37
37
|
setContent: (content: string) => Promise<void>;
|
|
38
|
+
setMarkdown: (markdown: string) => Promise<void>;
|
|
39
|
+
appendMarkdown: (markdown: string) => Promise<void>;
|
|
40
|
+
getMarkdownContent: () => string;
|
|
38
41
|
appendContent: (content: string | string[]) => Promise<void>;
|
|
39
42
|
getTextContent: () => string[];
|
|
40
43
|
insertContent: (content: string | Node) => void;
|
|
@@ -11,4 +11,7 @@ export declare abstract class IContentManager {
|
|
|
11
11
|
abstract getParas(): HTMLElement[];
|
|
12
12
|
abstract getTextContent(): string[];
|
|
13
13
|
abstract insertEmptyPara(): void;
|
|
14
|
+
abstract setMarkdown(markdown: string): void;
|
|
15
|
+
abstract appendMarkdown(markdown: string): void;
|
|
16
|
+
abstract getMarkdownContent(): string;
|
|
14
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linker-design-plus/tiny-peony",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.36",
|
|
4
4
|
"description": "a simple editor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@om-design/util": "^1.6.1",
|
|
28
28
|
"@vueuse/core": "^12.3.0",
|
|
29
29
|
"@zcsol/shared": "^0.1.0",
|
|
30
|
+
"marked": "^18.0.0",
|
|
30
31
|
"uuid": "^11.0.4",
|
|
31
32
|
"vue": "3.5.13"
|
|
32
33
|
},
|