@blocknote/core 0.25.2 → 0.27.0
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/blocknote.cjs +11 -10
- package/dist/blocknote.cjs.map +1 -1
- package/dist/blocknote.js +3722 -9856
- package/dist/blocknote.js.map +1 -1
- package/dist/comments.cjs +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js +45 -44
- package/dist/comments.js.map +1 -1
- package/dist/en-B7ycW7c8.js +360 -0
- package/dist/en-B7ycW7c8.js.map +1 -0
- package/dist/en-D4taoCs4.cjs +2 -0
- package/dist/en-D4taoCs4.cjs.map +1 -0
- package/dist/locales.cjs +2 -0
- package/dist/locales.cjs.map +1 -0
- package/dist/locales.js +6129 -0
- package/dist/locales.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +36 -27
- package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -1
- package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -1
- package/src/api/clipboard/clipboardExternal.test.ts +1 -1
- package/src/api/clipboard/clipboardInternal.test.ts +1 -1
- package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +1 -0
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +96 -42
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +1 -1
- package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +1 -1
- package/src/api/exporters/html/htmlConversion.test.ts +2 -2
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +4 -4
- package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +1 -1
- package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +8 -6
- package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +6 -6
- package/src/api/exporters/markdown/markdownExporter.test.ts +2 -2
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +2 -2
- package/src/api/nodeConversions/nodeToBlock.ts +1 -0
- package/src/api/parsers/html/__snapshots__/parse-2-tables.json +129 -0
- package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +1 -1
- package/src/api/parsers/html/parseHTML.test.ts +36 -1
- package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +42 -0
- package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +19 -0
- package/src/api/parsers/markdown/detectMarkdown.ts +60 -0
- package/src/api/parsers/markdown/parseMarkdown.test.ts +7 -2
- package/src/api/parsers/markdown/parseMarkdown.ts +19 -18
- package/src/api/testUtil/cases/defaultSchema.ts +13 -0
- package/src/blocks/CodeBlockContent/CodeBlockContent.ts +100 -69
- package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +98 -0
- package/src/blocks/TableBlockContent/TableExtension.ts +1 -1
- package/src/blocks/defaultBlocks.ts +2 -2
- package/src/comments/threadstore/yjs/YjsThreadStore.ts +1 -0
- package/src/comments/threadstore/yjs/yjsHelpers.ts +3 -1
- package/src/comments/types.ts +4 -0
- package/src/editor/Block.css +14 -1
- package/src/editor/BlockNoteEditor.ts +103 -11
- package/src/editor/BlockNoteExtensions.ts +18 -4
- package/src/editor/BlockNoteTipTapEditor.ts +18 -7
- package/src/extensions/Comments/CommentsPlugin.ts +77 -30
- package/src/extensions/HardBreak/HardBreak.ts +35 -0
- package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +100 -3
- package/src/extensions/SideMenu/dragging.ts +13 -0
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +3 -1
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +18 -2
- package/src/extensions/TableHandles/TableHandlesPlugin.ts +24 -23
- package/src/i18n/index.ts +2 -0
- package/src/i18n/locales/ar.ts +10 -0
- package/src/i18n/locales/de.ts +21 -1
- package/src/i18n/locales/en.ts +10 -0
- package/src/i18n/locales/es.ts +21 -1
- package/src/i18n/locales/fr.ts +10 -0
- package/src/i18n/locales/hr.ts +27 -4
- package/src/i18n/locales/is.ts +10 -0
- package/src/i18n/locales/it.ts +21 -1
- package/src/i18n/locales/ja.ts +10 -0
- package/src/i18n/locales/ko.ts +10 -0
- package/src/i18n/locales/nl.ts +10 -0
- package/src/i18n/locales/no.ts +10 -0
- package/src/i18n/locales/pl.ts +10 -0
- package/src/i18n/locales/pt.ts +10 -0
- package/src/i18n/locales/ru.ts +10 -0
- package/src/i18n/locales/uk.ts +10 -0
- package/src/i18n/locales/vi.ts +10 -0
- package/src/i18n/locales/zh.ts +10 -0
- package/src/index.ts +2 -3
- package/src/locales.ts +1 -0
- package/src/schema/blocks/types.ts +1 -0
- package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +1 -1
- package/types/src/api/blockManipulation/setupTestEnv.d.ts +34 -2
- package/types/src/api/clipboard/fromClipboard/acceptedMIMETypes.d.ts +1 -1
- package/types/src/api/clipboard/fromClipboard/fileDropExtension.d.ts +2 -2
- package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +3 -3
- package/types/src/api/clipboard/testUtil.d.ts +66 -34
- package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
- package/types/src/api/exporters/html/externalHTMLExporter.d.ts +2 -2
- package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +2 -2
- package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/parsers/markdown/detectMarkdown.d.ts +6 -0
- package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -0
- package/types/src/api/testUtil/cases/customBlocks.d.ts +72 -40
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +34 -2
- package/types/src/api/testUtil/cases/customStyles.d.ts +34 -2
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
- package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +46 -34
- package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +3 -3
- package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
- package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +2 -2
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -2
- package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +2 -2
- package/types/src/blocks/PageBreakBlockContent/schema.d.ts +13 -13
- package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -2
- package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +52 -0
- package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +2 -2
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +2 -2
- package/types/src/blocks/defaultBlockHelpers.d.ts +2 -2
- package/types/src/blocks/defaultBlocks.d.ts +107 -44
- package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +3 -3
- package/types/src/comments/types.d.ts +4 -0
- package/types/src/editor/BlockNoteEditor.d.ts +58 -0
- package/types/src/editor/BlockNoteExtensions.d.ts +3 -2
- package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -1
- package/types/src/exporter/mapping.d.ts +2 -2
- package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +1 -1
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
- package/types/src/extensions/Comments/CommentsPlugin.d.ts +16 -1
- package/types/src/extensions/HardBreak/HardBreak.d.ts +2 -0
- package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +4 -4
- package/types/src/extensions/TextColor/TextColorMark.d.ts +1 -1
- package/types/src/i18n/index.d.ts +2 -0
- package/types/src/i18n/locales/de.d.ts +2 -304
- package/types/src/i18n/locales/en.d.ts +11 -1
- package/types/src/i18n/locales/es.d.ts +2 -269
- package/types/src/i18n/locales/hr.d.ts +2 -266
- package/types/src/i18n/locales/it.d.ts +2 -269
- package/types/src/index.d.ts +1 -2
- package/types/src/locales.d.ts +1 -0
- package/types/src/pm-nodes/BlockContainer.d.ts +2 -7
- package/types/src/pm-nodes/BlockGroup.d.ts +2 -7
- package/types/src/schema/blocks/types.d.ts +1 -0
- package/types/src/schema/inlineContent/internal.d.ts +1 -1
- package/README.md +0 -125
- package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +0 -116
- package/types/src/blocks/CodeBlockContent/shiki.bundle.d.ts +0 -82
|
@@ -76,6 +76,40 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
76
76
|
};
|
|
77
77
|
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
78
78
|
};
|
|
79
|
+
quote: {
|
|
80
|
+
config: {
|
|
81
|
+
type: "quote";
|
|
82
|
+
content: "inline";
|
|
83
|
+
propSchema: {
|
|
84
|
+
backgroundColor: {
|
|
85
|
+
default: "default";
|
|
86
|
+
};
|
|
87
|
+
textColor: {
|
|
88
|
+
default: "default";
|
|
89
|
+
};
|
|
90
|
+
textAlignment: {
|
|
91
|
+
default: "left";
|
|
92
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
97
|
+
type: "quote";
|
|
98
|
+
content: "inline";
|
|
99
|
+
propSchema: {
|
|
100
|
+
backgroundColor: {
|
|
101
|
+
default: "default";
|
|
102
|
+
};
|
|
103
|
+
textColor: {
|
|
104
|
+
default: "default";
|
|
105
|
+
};
|
|
106
|
+
textAlignment: {
|
|
107
|
+
default: "left";
|
|
108
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
112
|
+
};
|
|
79
113
|
codeBlock: {
|
|
80
114
|
config: {
|
|
81
115
|
type: "codeBlock";
|
|
@@ -83,7 +117,6 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
83
117
|
propSchema: {
|
|
84
118
|
language: {
|
|
85
119
|
default: string;
|
|
86
|
-
values: string[];
|
|
87
120
|
};
|
|
88
121
|
};
|
|
89
122
|
};
|
|
@@ -93,7 +126,6 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
|
|
|
93
126
|
propSchema: {
|
|
94
127
|
language: {
|
|
95
128
|
default: string;
|
|
96
|
-
values: string[];
|
|
97
129
|
};
|
|
98
130
|
};
|
|
99
131
|
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const acceptedMIMETypes: readonly ["vscode-editor-data", "blocknote/html", "text/html", "text/plain", "Files"];
|
|
1
|
+
export declare const acceptedMIMETypes: readonly ["vscode-editor-data", "blocknote/html", "text/markdown", "text/html", "text/plain", "Files"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
|
|
3
|
-
import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
4
|
-
export declare const createDropFileExtension: <BSchema extends
|
|
3
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
4
|
+
export declare const createDropFileExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
|
|
5
5
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
6
6
|
}, undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
|
-
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor";
|
|
3
|
-
import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
4
|
-
export declare const createPasteFromClipboardExtension: <BSchema extends
|
|
2
|
+
import type { BlockNoteEditor, BlockNoteEditorOptions } from "../../../editor/BlockNoteEditor";
|
|
3
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
4
|
+
export declare const createPasteFromClipboardExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, pasteHandler: Exclude<BlockNoteEditorOptions<any, any, any>["pasteHandler"], undefined>) => Extension<any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
|
|
2
|
-
export declare const schema: BlockNoteSchema<import("../../
|
|
2
|
+
export declare const schema: BlockNoteSchema<import("../../index.js").BlockSchemaFromSpecs<{
|
|
3
3
|
customParagraph: any;
|
|
4
4
|
paragraph: {
|
|
5
5
|
config: {
|
|
@@ -18,7 +18,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
implementation: import("../../
|
|
21
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
22
22
|
type: "paragraph";
|
|
23
23
|
content: "inline";
|
|
24
24
|
propSchema: {
|
|
@@ -33,7 +33,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
33
33
|
values: readonly ["left", "center", "right", "justify"];
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
}, any, import("../../
|
|
36
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
37
37
|
};
|
|
38
38
|
heading: {
|
|
39
39
|
config: {
|
|
@@ -56,7 +56,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
implementation: import("../../
|
|
59
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
60
60
|
type: "heading";
|
|
61
61
|
content: "inline";
|
|
62
62
|
propSchema: {
|
|
@@ -75,7 +75,41 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
75
75
|
values: readonly ["left", "center", "right", "justify"];
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
-
}, any, import("../../
|
|
78
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
79
|
+
};
|
|
80
|
+
quote: {
|
|
81
|
+
config: {
|
|
82
|
+
type: "quote";
|
|
83
|
+
content: "inline";
|
|
84
|
+
propSchema: {
|
|
85
|
+
backgroundColor: {
|
|
86
|
+
default: "default";
|
|
87
|
+
};
|
|
88
|
+
textColor: {
|
|
89
|
+
default: "default";
|
|
90
|
+
};
|
|
91
|
+
textAlignment: {
|
|
92
|
+
default: "left";
|
|
93
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
98
|
+
type: "quote";
|
|
99
|
+
content: "inline";
|
|
100
|
+
propSchema: {
|
|
101
|
+
backgroundColor: {
|
|
102
|
+
default: "default";
|
|
103
|
+
};
|
|
104
|
+
textColor: {
|
|
105
|
+
default: "default";
|
|
106
|
+
};
|
|
107
|
+
textAlignment: {
|
|
108
|
+
default: "left";
|
|
109
|
+
values: readonly ["left", "center", "right", "justify"];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
79
113
|
};
|
|
80
114
|
codeBlock: {
|
|
81
115
|
config: {
|
|
@@ -84,20 +118,18 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
84
118
|
propSchema: {
|
|
85
119
|
language: {
|
|
86
120
|
default: string;
|
|
87
|
-
values: string[];
|
|
88
121
|
};
|
|
89
122
|
};
|
|
90
123
|
};
|
|
91
|
-
implementation: import("../../
|
|
124
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
92
125
|
type: "codeBlock";
|
|
93
126
|
content: "inline";
|
|
94
127
|
propSchema: {
|
|
95
128
|
language: {
|
|
96
129
|
default: string;
|
|
97
|
-
values: string[];
|
|
98
130
|
};
|
|
99
131
|
};
|
|
100
|
-
}, any, import("../../
|
|
132
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
101
133
|
};
|
|
102
134
|
bulletListItem: {
|
|
103
135
|
config: {
|
|
@@ -116,7 +148,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
116
148
|
};
|
|
117
149
|
};
|
|
118
150
|
};
|
|
119
|
-
implementation: import("../../
|
|
151
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
120
152
|
type: "bulletListItem";
|
|
121
153
|
content: "inline";
|
|
122
154
|
propSchema: {
|
|
@@ -131,7 +163,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
131
163
|
values: readonly ["left", "center", "right", "justify"];
|
|
132
164
|
};
|
|
133
165
|
};
|
|
134
|
-
}, any, import("../../
|
|
166
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
135
167
|
};
|
|
136
168
|
numberedListItem: {
|
|
137
169
|
config: {
|
|
@@ -154,7 +186,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
154
186
|
};
|
|
155
187
|
};
|
|
156
188
|
};
|
|
157
|
-
implementation: import("../../
|
|
189
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
158
190
|
type: "numberedListItem";
|
|
159
191
|
content: "inline";
|
|
160
192
|
propSchema: {
|
|
@@ -173,7 +205,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
173
205
|
values: readonly ["left", "center", "right", "justify"];
|
|
174
206
|
};
|
|
175
207
|
};
|
|
176
|
-
}, any, import("../../
|
|
208
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
177
209
|
};
|
|
178
210
|
checkListItem: {
|
|
179
211
|
config: {
|
|
@@ -195,7 +227,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
195
227
|
};
|
|
196
228
|
};
|
|
197
229
|
};
|
|
198
|
-
implementation: import("../../
|
|
230
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
199
231
|
type: "checkListItem";
|
|
200
232
|
content: "inline";
|
|
201
233
|
propSchema: {
|
|
@@ -213,7 +245,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
213
245
|
values: readonly ["left", "center", "right", "justify"];
|
|
214
246
|
};
|
|
215
247
|
};
|
|
216
|
-
}, any, import("../../
|
|
248
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
217
249
|
};
|
|
218
250
|
table: {
|
|
219
251
|
config: {
|
|
@@ -225,7 +257,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
225
257
|
};
|
|
226
258
|
};
|
|
227
259
|
};
|
|
228
|
-
implementation: import("../../
|
|
260
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
229
261
|
type: "table";
|
|
230
262
|
content: "table";
|
|
231
263
|
propSchema: {
|
|
@@ -233,7 +265,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
233
265
|
default: "default";
|
|
234
266
|
};
|
|
235
267
|
};
|
|
236
|
-
}, any, import("../../
|
|
268
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
237
269
|
};
|
|
238
270
|
file: {
|
|
239
271
|
config: {
|
|
@@ -255,7 +287,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
255
287
|
content: "none";
|
|
256
288
|
isFileBlock: true;
|
|
257
289
|
};
|
|
258
|
-
implementation: import("../../
|
|
290
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
259
291
|
type: "file";
|
|
260
292
|
propSchema: {
|
|
261
293
|
backgroundColor: {
|
|
@@ -273,7 +305,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
273
305
|
};
|
|
274
306
|
content: "none";
|
|
275
307
|
isFileBlock: true;
|
|
276
|
-
}, any, import("../../
|
|
308
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
277
309
|
};
|
|
278
310
|
image: {
|
|
279
311
|
config: {
|
|
@@ -306,7 +338,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
306
338
|
isFileBlock: true;
|
|
307
339
|
fileBlockAccept: string[];
|
|
308
340
|
};
|
|
309
|
-
implementation: import("../../
|
|
341
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
310
342
|
type: "image";
|
|
311
343
|
propSchema: {
|
|
312
344
|
textAlignment: {
|
|
@@ -335,7 +367,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
335
367
|
content: "none";
|
|
336
368
|
isFileBlock: true;
|
|
337
369
|
fileBlockAccept: string[];
|
|
338
|
-
}, any, import("../../
|
|
370
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
339
371
|
};
|
|
340
372
|
video: {
|
|
341
373
|
config: {
|
|
@@ -368,7 +400,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
368
400
|
isFileBlock: true;
|
|
369
401
|
fileBlockAccept: string[];
|
|
370
402
|
};
|
|
371
|
-
implementation: import("../../
|
|
403
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
372
404
|
type: "video";
|
|
373
405
|
propSchema: {
|
|
374
406
|
textAlignment: {
|
|
@@ -397,7 +429,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
397
429
|
content: "none";
|
|
398
430
|
isFileBlock: true;
|
|
399
431
|
fileBlockAccept: string[];
|
|
400
|
-
}, any, import("../../
|
|
432
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
401
433
|
};
|
|
402
434
|
audio: {
|
|
403
435
|
config: {
|
|
@@ -423,7 +455,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
423
455
|
isFileBlock: true;
|
|
424
456
|
fileBlockAccept: string[];
|
|
425
457
|
};
|
|
426
|
-
implementation: import("../../
|
|
458
|
+
implementation: import("../../index.js").TiptapBlockImplementation<{
|
|
427
459
|
type: "audio";
|
|
428
460
|
propSchema: {
|
|
429
461
|
backgroundColor: {
|
|
@@ -445,9 +477,9 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
445
477
|
content: "none";
|
|
446
478
|
isFileBlock: true;
|
|
447
479
|
fileBlockAccept: string[];
|
|
448
|
-
}, any, import("../../
|
|
480
|
+
}, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
|
|
449
481
|
};
|
|
450
|
-
}>, import("../../
|
|
482
|
+
}>, import("../../index.js").InlineContentSchemaFromSpecs<{
|
|
451
483
|
text: {
|
|
452
484
|
config: "text";
|
|
453
485
|
implementation: any;
|
|
@@ -456,54 +488,54 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
|
|
|
456
488
|
config: "link";
|
|
457
489
|
implementation: any;
|
|
458
490
|
};
|
|
459
|
-
}>, import("../../
|
|
491
|
+
}>, import("../../index.js").StyleSchemaFromSpecs<{
|
|
460
492
|
bold: {
|
|
461
493
|
config: {
|
|
462
494
|
type: string;
|
|
463
495
|
propSchema: "boolean";
|
|
464
496
|
};
|
|
465
|
-
implementation: import("../../
|
|
497
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
466
498
|
};
|
|
467
499
|
italic: {
|
|
468
500
|
config: {
|
|
469
501
|
type: string;
|
|
470
502
|
propSchema: "boolean";
|
|
471
503
|
};
|
|
472
|
-
implementation: import("../../
|
|
504
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
473
505
|
};
|
|
474
506
|
underline: {
|
|
475
507
|
config: {
|
|
476
508
|
type: string;
|
|
477
509
|
propSchema: "boolean";
|
|
478
510
|
};
|
|
479
|
-
implementation: import("../../
|
|
511
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
480
512
|
};
|
|
481
513
|
strike: {
|
|
482
514
|
config: {
|
|
483
515
|
type: string;
|
|
484
516
|
propSchema: "boolean";
|
|
485
517
|
};
|
|
486
|
-
implementation: import("../../
|
|
518
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
487
519
|
};
|
|
488
520
|
code: {
|
|
489
521
|
config: {
|
|
490
522
|
type: string;
|
|
491
523
|
propSchema: "boolean";
|
|
492
524
|
};
|
|
493
|
-
implementation: import("../../
|
|
525
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
494
526
|
};
|
|
495
527
|
textColor: {
|
|
496
528
|
config: {
|
|
497
529
|
type: string;
|
|
498
530
|
propSchema: "string";
|
|
499
531
|
};
|
|
500
|
-
implementation: import("../../
|
|
532
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
501
533
|
};
|
|
502
534
|
backgroundColor: {
|
|
503
535
|
config: {
|
|
504
536
|
type: string;
|
|
505
537
|
propSchema: "string";
|
|
506
538
|
};
|
|
507
|
-
implementation: import("../../
|
|
539
|
+
implementation: import("../../index.js").StyleImplementation;
|
|
508
540
|
};
|
|
509
541
|
}>>;
|
|
@@ -7,6 +7,6 @@ export declare function selectedFragmentToHTML<BSchema extends BlockSchema, I ex
|
|
|
7
7
|
externalHTML: string;
|
|
8
8
|
markdown: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const createCopyToClipboardExtension: <BSchema extends
|
|
10
|
+
export declare const createCopyToClipboardExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
|
|
11
11
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
12
12
|
}, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from "prosemirror-model";
|
|
2
2
|
import { PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
3
3
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
|
|
4
|
-
import { InlineContent, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
5
|
-
export declare const createExternalHTMLExporter: <BSchema extends
|
|
4
|
+
import { BlockSchema, InlineContent, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
5
|
+
export declare const createExternalHTMLExporter: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
|
|
6
6
|
exportBlocks: (blocks: PartialBlock<BSchema, I, S>[], options: {
|
|
7
7
|
document?: Document;
|
|
8
8
|
}) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from "prosemirror-model";
|
|
2
2
|
import { PartialBlock } from "../../../blocks/defaultBlocks.js";
|
|
3
3
|
import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
|
|
4
|
-
import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
5
|
-
export declare const createInternalHTMLSerializer: <BSchema extends
|
|
4
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
5
|
+
export declare const createInternalHTMLSerializer: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
|
|
6
6
|
serializeBlocks: (blocks: PartialBlock<BSchema, I, S>[], options: {
|
|
7
7
|
document?: Document;
|
|
8
8
|
}) => string;
|
|
@@ -5,6 +5,6 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schem
|
|
|
5
5
|
export declare function serializeInlineContentExternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, options?: {
|
|
6
6
|
document?: Document;
|
|
7
7
|
}): HTMLElement | DocumentFragment;
|
|
8
|
-
export declare const serializeBlocksExternalHTML: <BSchema extends
|
|
8
|
+
export declare const serializeBlocksExternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, orderedListItemBlockTypes: Set<string>, unorderedListItemBlockTypes: Set<string>, options?: {
|
|
9
9
|
document?: Document;
|
|
10
10
|
}) => DocumentFragment;
|
|
@@ -5,6 +5,6 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schem
|
|
|
5
5
|
export declare function serializeInlineContentInternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, blockType?: string, options?: {
|
|
6
6
|
document?: Document;
|
|
7
7
|
}): HTMLElement | DocumentFragment;
|
|
8
|
-
export declare const serializeBlocksInternalHTML: <BSchema extends
|
|
8
|
+
export declare const serializeBlocksInternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, options?: {
|
|
9
9
|
document?: Document;
|
|
10
10
|
}) => HTMLElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema } from "prosemirror-model";
|
|
2
2
|
import { Block } from "../../../blocks/defaultBlocks.js";
|
|
3
3
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
|
|
4
|
+
export declare function markdownToHTML(markdown: string): Promise<string>;
|
|
4
5
|
export declare function markdownToBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(markdown: string, blockSchema: BSchema, icSchema: I, styleSchema: S, pmSchema: Schema): Promise<Block<BSchema, I, S>[]>;
|