@blocknote/core 0.15.2 → 0.15.3
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/README.md +1 -1
- package/dist/blocknote.js +627 -628
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +3 -3
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +8 -3
- package/types/src/api/blockManipulation/blockManipulation.d.ts +1 -1
- package/types/src/api/exporters/copyExtension.d.ts +2 -2
- package/types/src/api/exporters/html/externalHTMLExporter.d.ts +1 -1
- package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +1 -1
- package/types/src/api/exporters/html/util/sharedHTMLConversion.d.ts +2 -2
- package/types/src/api/parsers/fileDropExtension.d.ts +2 -2
- package/types/src/api/parsers/pasteExtension.d.ts +2 -2
- package/types/src/blocks/defaultBlockHelpers.d.ts +2 -2
- package/types/src/editor/BlockNoteExtensions.d.ts +2 -2
- package/types/src/pm-nodes/BlockContainer.d.ts +8 -2
- package/types/src/pm-nodes/BlockGroup.d.ts +7 -2
- package/types/src/schema/inlineContent/internal.d.ts +1 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1721335278382,"assets":[{"name":"blocknote.umd.cjs","size":185797},{"name":"blocknote.umd.cjs.map","size":682960}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":6582,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":6664,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":7294,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":6876,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":6323,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":6146,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":7079,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":6768,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":6965,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":6927,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":6093,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":7638,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":8518,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":1691,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeConversions.ts","size":11998,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/sharedHTMLConversion.ts","size":2311,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts","size":3119,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":1161,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":758,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1691,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":3877,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":2814,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1357,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":1627,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/fileBlockHelpers.ts","size":8574,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/audioBlockHelpers.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3741,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1939,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/imageBlockHelpers.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3959,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/videoBlockHelpers.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3763,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/api/getCurrentBlockContentType.ts","size":192,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3439,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1201,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3122,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":1862,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":3437,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":6423,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1307,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":1462,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":1624,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1123,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1580,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":548,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/blockManipulation.ts","size":5664,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":775,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":640,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1054,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3480,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5062,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7365,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":17063,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":7719,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":15235,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/copyExtension.ts","size":2951,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6319,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/acceptedMIMETypes.ts","size":91,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/handleFileInsertion.ts","size":1983,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/pasteExtension.ts","size":1244,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":791,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":928,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":725,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1594,"chunks":["a1ee98a"]},{"name":"./src/extensions/NonEditableBlocks/NonEditableBlockPlugin.ts","size":1014,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4578,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":18112,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4243,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":1062,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":2823,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":2758,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":26212,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":700,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":2166,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]}]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"homepage": "https://github.com/TypeCellOS/BlockNote",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "0.15.
|
|
6
|
+
"version": "0.15.3",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"types",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"access": "public",
|
|
120
120
|
"registry": "https://registry.npmjs.org/"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "34c2039e632d19db79f11adf17b2c2acab33e0bc"
|
|
123
123
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Emoji, EmojiMartData } from "@emoji-mart/data";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { checkDefaultInlineContentTypeInSchema } from "../../blocks/defaultBlockTypeGuards";
|
|
4
4
|
import { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
5
5
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
@@ -11,6 +11,8 @@ let data:
|
|
|
11
11
|
}>
|
|
12
12
|
| undefined;
|
|
13
13
|
|
|
14
|
+
let emojiMart: typeof import("emoji-mart") | undefined;
|
|
15
|
+
|
|
14
16
|
export async function getDefaultEmojiPickerItems<
|
|
15
17
|
BSchema extends BlockSchema,
|
|
16
18
|
I extends InlineContentSchema,
|
|
@@ -27,8 +29,11 @@ export async function getDefaultEmojiPickerItems<
|
|
|
27
29
|
// use a dynamic import to encourage bundle-splitting
|
|
28
30
|
// and a smaller initial client bundle size
|
|
29
31
|
data = import("@emoji-mart/data", { assert: { type: "json" } }) as any;
|
|
32
|
+
|
|
33
|
+
// load dynamically because emoji-mart doesn't specify type: module and breaks in nodejs
|
|
34
|
+
emojiMart = await import("emoji-mart");
|
|
30
35
|
const emojiMartData = (await data)!.default;
|
|
31
|
-
await init({ data: emojiMartData });
|
|
36
|
+
await emojiMart.init({ data: emojiMartData });
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
const emojiMartData = (await data)!.default;
|
|
@@ -36,7 +41,7 @@ export async function getDefaultEmojiPickerItems<
|
|
|
36
41
|
const emojisToShow =
|
|
37
42
|
query.trim() === ""
|
|
38
43
|
? Object.values(emojiMartData.emojis)
|
|
39
|
-
: ((await SearchIndex.search(query)) as Emoji[]);
|
|
44
|
+
: ((await emojiMart!.SearchIndex.search(query)) as Emoji[]);
|
|
40
45
|
|
|
41
46
|
return emojisToShow.map((emoji) => ({
|
|
42
47
|
id: emoji.skins[0].native,
|
|
@@ -2,7 +2,7 @@ import { Node } from "prosemirror-model";
|
|
|
2
2
|
import { Block, PartialBlock } from "../../blocks/defaultBlocks";
|
|
3
3
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
4
4
|
import { BlockIdentifier, BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
5
|
-
export declare function insertBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blocksToInsert: PartialBlock<BSchema, I, S>[], referenceBlock: BlockIdentifier, placement:
|
|
5
|
+
export declare function insertBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blocksToInsert: PartialBlock<BSchema, I, S>[], referenceBlock: BlockIdentifier, placement: "before" | "after" | "nested" | undefined, editor: BlockNoteEditor<BSchema, I, S>): Block<BSchema, I, S>[];
|
|
6
6
|
export declare function updateBlock<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blockToUpdate: BlockIdentifier, update: PartialBlock<BSchema, I, S>, editor: BlockNoteEditor<BSchema, I, S>): Block<BSchema, I, S>;
|
|
7
7
|
export declare function removeBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blocksToRemove: BlockIdentifier[], editor: BlockNoteEditor<BSchema, I, S>): Block<BSchema, I, S>[];
|
|
8
8
|
export declare function replaceBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(blocksToRemove: BlockIdentifier[], blocksToInsert: PartialBlock<BSchema, I, S>[], editor: BlockNoteEditor<BSchema, I, S>): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
3
|
-
import {
|
|
4
|
-
export declare const createCopyToClipboardExtension: <BSchema extends
|
|
3
|
+
import { InlineContentSchema, StyleSchema } from "../../schema";
|
|
4
|
+
export declare const createCopyToClipboardExtension: <BSchema extends Record<string, import("../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
|
|
5
5
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
6
6
|
}, undefined>;
|
|
@@ -10,4 +10,4 @@ export interface ExternalHTMLExporter<BSchema extends BlockSchema, I extends Inl
|
|
|
10
10
|
document?: Document;
|
|
11
11
|
}) => string;
|
|
12
12
|
}
|
|
13
|
-
export declare const createExternalHTMLExporter: <BSchema extends
|
|
13
|
+
export declare const createExternalHTMLExporter: <BSchema extends Record<string, import("../../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => ExternalHTMLExporter<BSchema, I, S>;
|
|
@@ -10,4 +10,4 @@ export interface InternalHTMLSerializer<BSchema extends BlockSchema, I extends I
|
|
|
10
10
|
document?: Document;
|
|
11
11
|
}) => string;
|
|
12
12
|
}
|
|
13
|
-
export declare const createInternalHTMLSerializer: <BSchema extends
|
|
13
|
+
export declare const createInternalHTMLSerializer: <BSchema extends Record<string, import("../../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => InternalHTMLSerializer<BSchema, I, S>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOMSerializer, Fragment, Node } from "prosemirror-model";
|
|
2
2
|
import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor";
|
|
3
|
-
import {
|
|
4
|
-
export declare const serializeNodeInner: <BSchema extends
|
|
3
|
+
import { InlineContentSchema, StyleSchema } from "../../../../schema";
|
|
4
|
+
export declare const serializeNodeInner: <BSchema extends Record<string, import("../../../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(node: Node, options: {
|
|
5
5
|
document?: Document;
|
|
6
6
|
}, serializer: DOMSerializer, editor: BlockNoteEditor<BSchema, I, S>, toExternalHTML: boolean) => HTMLElement;
|
|
7
7
|
export declare const serializeProseMirrorFragment: (fragment: Fragment, serializer: DOMSerializer, options?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
3
|
-
import {
|
|
4
|
-
export declare const createDropFileExtension: <BSchema extends
|
|
3
|
+
import { InlineContentSchema, StyleSchema } from "../../schema";
|
|
4
|
+
export declare const createDropFileExtension: <BSchema extends Record<string, import("../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
|
|
5
5
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
6
6
|
}, undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from "@tiptap/core";
|
|
2
2
|
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
3
|
-
import {
|
|
4
|
-
export declare const createPasteFromClipboardExtension: <BSchema extends
|
|
3
|
+
import { InlineContentSchema, StyleSchema } from "../../schema";
|
|
4
|
+
export declare const createPasteFromClipboardExtension: <BSchema extends Record<string, import("../../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
|
|
5
5
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
6
6
|
}, undefined>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BlockNoteEditor } from "../editor/BlockNoteEditor";
|
|
2
|
-
import type { BlockNoDefaults,
|
|
2
|
+
import type { BlockNoDefaults, InlineContentSchema, StyleSchema } from "../schema";
|
|
3
3
|
export declare function createDefaultBlockDOMOutputSpec(blockName: string, htmlTag: string, blockContentHTMLAttributes: Record<string, string>, inlineContentHTMLAttributes: Record<string, string>): {
|
|
4
4
|
dom: HTMLDivElement;
|
|
5
5
|
contentDOM: HTMLElement;
|
|
6
6
|
};
|
|
7
|
-
export declare const defaultBlockToHTML: <BSchema extends
|
|
7
|
+
export declare const defaultBlockToHTML: <BSchema extends Record<string, import("../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(block: BlockNoDefaults<BSchema, I, S>, editor: BlockNoteEditor<BSchema, I, S>) => {
|
|
8
8
|
dom: HTMLElement;
|
|
9
9
|
contentDOM?: HTMLElement;
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { BlockNoteEditor } from "./BlockNoteEditor";
|
|
2
2
|
import * as Y from "yjs";
|
|
3
|
-
import { BlockNoteDOMAttributes,
|
|
3
|
+
import { BlockNoteDOMAttributes, BlockSpecs, InlineContentSchema, InlineContentSpecs, StyleSchema, StyleSpecs } from "../schema";
|
|
4
4
|
/**
|
|
5
5
|
* Get all the Tiptap extensions BlockNote is configured with by default
|
|
6
6
|
*/
|
|
7
|
-
export declare const getBlockNoteExtensions: <BSchema extends
|
|
7
|
+
export declare const getBlockNoteExtensions: <BSchema extends Record<string, import("../schema").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(opts: {
|
|
8
8
|
editor: BlockNoteEditor<BSchema, I, S>;
|
|
9
9
|
domAttributes: Partial<BlockNoteDOMAttributes>;
|
|
10
10
|
blockSpecs: BlockSpecs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
2
|
import { PartialBlock } from "../blocks/defaultBlocks";
|
|
3
3
|
import type { BlockNoteEditor } from "../editor/BlockNoteEditor";
|
|
4
|
-
import {
|
|
4
|
+
import { BlockSchema, InlineContentSchema, StyleSchema } from "../schema";
|
|
5
5
|
declare module "@tiptap/core" {
|
|
6
6
|
interface Commands<ReturnType> {
|
|
7
7
|
block: {
|
|
@@ -18,6 +18,12 @@ declare module "@tiptap/core" {
|
|
|
18
18
|
* The main "Block node" documents consist of
|
|
19
19
|
*/
|
|
20
20
|
export declare const BlockContainer: Node<{
|
|
21
|
-
domAttributes?:
|
|
21
|
+
domAttributes?: Partial<{
|
|
22
|
+
blockGroup: Record<string, string>;
|
|
23
|
+
block: Record<string, string>;
|
|
24
|
+
editor: Record<string, string>;
|
|
25
|
+
blockContent: Record<string, string>;
|
|
26
|
+
inlineContent: Record<string, string>;
|
|
27
|
+
}> | undefined;
|
|
22
28
|
editor: BlockNoteEditor<any, any, any>;
|
|
23
29
|
}, any>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
|
-
import { BlockNoteDOMAttributes } from "../schema";
|
|
3
2
|
export declare const BlockGroup: Node<{
|
|
4
|
-
domAttributes?:
|
|
3
|
+
domAttributes?: Partial<{
|
|
4
|
+
blockGroup: Record<string, string>;
|
|
5
|
+
block: Record<string, string>;
|
|
6
|
+
editor: Record<string, string>;
|
|
7
|
+
blockContent: Record<string, string>;
|
|
8
|
+
inlineContent: Record<string, string>;
|
|
9
|
+
}> | undefined;
|
|
5
10
|
}, any>;
|
|
@@ -22,7 +22,7 @@ export declare function createInlineContentSpecFromTipTapNode<T extends Node, P
|
|
|
22
22
|
content: "styled" | "none";
|
|
23
23
|
};
|
|
24
24
|
implementation: {
|
|
25
|
-
node: Node
|
|
25
|
+
node: Node<any, any>;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export declare function getInlineContentSchemaFromSpecs<T extends InlineContentSpecs>(specs: T): InlineContentSchemaFromSpecs<T>;
|