@blocknote/core 0.11.0 → 0.11.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/blocknote.js +172 -164
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -6
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +24 -10
- package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +1 -1
- package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +1 -1
- package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +13 -0
- package/src/editor/Block.css +4 -0
- package/src/editor/BlockNoteEditor.ts +7 -7
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +5 -3
- package/src/extensions/SideMenu/SideMenuPlugin.ts +4 -1
- package/src/pm-nodes/BlockContainer.ts +0 -4
- package/types/src/editor/BlockNoteEditor.d.ts +2 -2
- package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +1 -1
package/dist/webpack-stats.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1706797867089,"assets":[{"name":"blocknote.umd.cjs","size":100892},{"name":"blocknote.umd.cjs.map","size":454885}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.umd.cjs"],"names":["index"]}],"modules":[{"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":108,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeConversions.ts","size":11959,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/sharedHTMLConversion.ts","size":2272,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts","size":2687,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":1059,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":697,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":432,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1724,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":3701,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":2781,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1357,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":1613,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":2796,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/ImageToolbar/ImageToolbarPlugin.ts","size":3772,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":9277,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1106,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":2691,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":1862,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":3148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1002,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":1462,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":1207,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1025,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":548,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/blockManipulation.ts","size":4471,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":549,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2022,"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/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":4985,"chunks":["a1ee98a"]},{"name":"./src/extensions/HyperlinkToolbar/HyperlinkToolbarPlugin.ts","size":7599,"chunks":["a1ee98a"]},{"name":"./src/extensions-shared/suggestion/SuggestionPlugin.ts","size":9492,"chunks":["a1ee98a"]},{"name":"./src/extensions/SlashMenu/SlashMenuPlugin.ts","size":839,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":15225,"chunks":["a1ee98a"]},{"name":"./src/extensions/SlashMenu/defaultSlashMenuItems.ts","size":4114,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":14723,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/copyExtension.ts","size":2883,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/pasteExtension.ts","size":1131,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":688,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderExtension.ts","size":2106,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":748,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":622,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1594,"chunks":["a1ee98a"]},{"name":"./src/extensions/NonEditableBlocks/NonEditableBlockPlugin.ts","size":467,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4572,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":17223,"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":3467,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":1017,"chunks":["a1ee98a"]},{"name":"./src/editor/Block.css","size":17,"chunks":["a1ee98a"]},{"name":"./src/editor/editor.css","size":18,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":22032,"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.11.
|
|
6
|
+
"version": "0.11.2",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"types",
|
|
@@ -50,9 +50,6 @@
|
|
|
50
50
|
"clean": "rimraf dist && rimraf types"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@emotion/cache": "^11.10.5",
|
|
54
|
-
"@emotion/serialize": "^1.1.1",
|
|
55
|
-
"@emotion/utils": "^1.2.0",
|
|
56
53
|
"@tiptap/core": "^2.0.3",
|
|
57
54
|
"@tiptap/extension-bold": "^2.0.3",
|
|
58
55
|
"@tiptap/extension-code": "^2.0.3",
|
|
@@ -89,7 +86,7 @@
|
|
|
89
86
|
"remark-stringify": "^10.0.2",
|
|
90
87
|
"unified": "^10.1.2",
|
|
91
88
|
"uuid": "^8.3.2",
|
|
92
|
-
"y-prosemirror": "1.
|
|
89
|
+
"y-prosemirror": "1.2.1",
|
|
93
90
|
"y-protocols": "^1.0.5",
|
|
94
91
|
"yjs": "^13.6.1"
|
|
95
92
|
},
|
|
@@ -115,5 +112,5 @@
|
|
|
115
112
|
"access": "public",
|
|
116
113
|
"registry": "https://registry.npmjs.org/"
|
|
117
114
|
},
|
|
118
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "f83314be0a714548e7a9ae7e10dd24573ce9901b"
|
|
119
116
|
}
|
|
@@ -148,6 +148,15 @@ export const renderImage = (
|
|
|
148
148
|
// offset from when the resize began, and which resize handle is being used.
|
|
149
149
|
const windowMouseMoveHandler = (event: MouseEvent) => {
|
|
150
150
|
if (!resizeParams) {
|
|
151
|
+
if (
|
|
152
|
+
!editor.isEditable &&
|
|
153
|
+
imageWrapper.contains(leftResizeHandle) &&
|
|
154
|
+
imageWrapper.contains(rightResizeHandle)
|
|
155
|
+
) {
|
|
156
|
+
imageWrapper.removeChild(leftResizeHandle);
|
|
157
|
+
imageWrapper.removeChild(rightResizeHandle);
|
|
158
|
+
}
|
|
159
|
+
|
|
151
160
|
return;
|
|
152
161
|
}
|
|
153
162
|
|
|
@@ -192,13 +201,11 @@ export const renderImage = (
|
|
|
192
201
|
// Stops mouse movements from resizing the image and updates the block's
|
|
193
202
|
// `width` prop to the new value.
|
|
194
203
|
const windowMouseUpHandler = (event: MouseEvent) => {
|
|
195
|
-
if (!resizeParams) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
204
|
// Hides the drag handles if the cursor is no longer over the image.
|
|
200
205
|
if (
|
|
201
|
-
(!event.target ||
|
|
206
|
+
(!event.target ||
|
|
207
|
+
!imageWrapper.contains(event.target as Node) ||
|
|
208
|
+
!editor.isEditable) &&
|
|
202
209
|
imageWrapper.contains(leftResizeHandle) &&
|
|
203
210
|
imageWrapper.contains(rightResizeHandle)
|
|
204
211
|
) {
|
|
@@ -206,6 +213,10 @@ export const renderImage = (
|
|
|
206
213
|
imageWrapper.removeChild(rightResizeHandle);
|
|
207
214
|
}
|
|
208
215
|
|
|
216
|
+
if (!resizeParams) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
209
220
|
resizeParams = undefined;
|
|
210
221
|
|
|
211
222
|
editor.updateBlock(block, {
|
|
@@ -235,9 +246,6 @@ export const renderImage = (
|
|
|
235
246
|
if (editor.isEditable) {
|
|
236
247
|
imageWrapper.appendChild(leftResizeHandle);
|
|
237
248
|
imageWrapper.appendChild(rightResizeHandle);
|
|
238
|
-
} else {
|
|
239
|
-
imageWrapper.removeChild(leftResizeHandle);
|
|
240
|
-
imageWrapper.removeChild(rightResizeHandle);
|
|
241
249
|
}
|
|
242
250
|
};
|
|
243
251
|
// Hides the resize handles when the cursor leaves the image, unless the
|
|
@@ -254,8 +262,14 @@ export const renderImage = (
|
|
|
254
262
|
return;
|
|
255
263
|
}
|
|
256
264
|
|
|
257
|
-
|
|
258
|
-
|
|
265
|
+
if (
|
|
266
|
+
editor.isEditable &&
|
|
267
|
+
imageWrapper.contains(leftResizeHandle) &&
|
|
268
|
+
imageWrapper.contains(rightResizeHandle)
|
|
269
|
+
) {
|
|
270
|
+
imageWrapper.removeChild(leftResizeHandle);
|
|
271
|
+
imageWrapper.removeChild(rightResizeHandle);
|
|
272
|
+
}
|
|
259
273
|
};
|
|
260
274
|
|
|
261
275
|
// Sets the resize params, allowing the user to begin resizing the image by
|
package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts
CHANGED
|
@@ -37,7 +37,7 @@ const BulletListItemBlockContent = createStronglyTypedTiptapNode({
|
|
|
37
37
|
addKeyboardShortcuts() {
|
|
38
38
|
return {
|
|
39
39
|
Enter: () => handleEnter(this.editor),
|
|
40
|
-
"Mod-Shift-
|
|
40
|
+
"Mod-Shift-8": () =>
|
|
41
41
|
this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor, {
|
|
42
42
|
type: "bulletListItem",
|
|
43
43
|
props: {},
|
package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts
CHANGED
|
@@ -52,7 +52,7 @@ const NumberedListItemBlockContent = createStronglyTypedTiptapNode({
|
|
|
52
52
|
addKeyboardShortcuts() {
|
|
53
53
|
return {
|
|
54
54
|
Enter: () => handleEnter(this.editor),
|
|
55
|
-
"Mod-Shift-
|
|
55
|
+
"Mod-Shift-7": () =>
|
|
56
56
|
this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor, {
|
|
57
57
|
type: "numberedListItem",
|
|
58
58
|
props: {},
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from "../../schema";
|
|
5
5
|
import { createDefaultBlockDOMOutputSpec } from "../defaultBlockHelpers";
|
|
6
6
|
import { defaultProps } from "../defaultProps";
|
|
7
|
+
import { handleEnter } from "../ListItemBlockContent/ListItemKeyboardShortcuts";
|
|
7
8
|
|
|
8
9
|
export const paragraphPropSchema = {
|
|
9
10
|
...defaultProps,
|
|
@@ -13,6 +14,18 @@ export const ParagraphBlockContent = createStronglyTypedTiptapNode({
|
|
|
13
14
|
name: "paragraph",
|
|
14
15
|
content: "inline*",
|
|
15
16
|
group: "blockContent",
|
|
17
|
+
|
|
18
|
+
addKeyboardShortcuts() {
|
|
19
|
+
return {
|
|
20
|
+
Enter: () => handleEnter(this.editor),
|
|
21
|
+
"Mod-Alt-0": () =>
|
|
22
|
+
this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor, {
|
|
23
|
+
type: "paragraph",
|
|
24
|
+
props: {},
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
|
|
16
29
|
parseHTML() {
|
|
17
30
|
return [
|
|
18
31
|
{ tag: "div[data-content-type=" + this.name + "]" },
|
package/src/editor/Block.css
CHANGED
|
@@ -21,11 +21,11 @@ import { HTMLToBlocks } from "../api/parsers/html/parseHTML";
|
|
|
21
21
|
import { markdownToBlocks } from "../api/parsers/markdown/parseMarkdown";
|
|
22
22
|
import {
|
|
23
23
|
DefaultBlockSchema,
|
|
24
|
+
DefaultInlineContentSchema,
|
|
25
|
+
DefaultStyleSchema,
|
|
24
26
|
defaultBlockSchema,
|
|
25
27
|
defaultBlockSpecs,
|
|
26
|
-
DefaultInlineContentSchema,
|
|
27
28
|
defaultInlineContentSpecs,
|
|
28
|
-
DefaultStyleSchema,
|
|
29
29
|
defaultStyleSpecs,
|
|
30
30
|
} from "../blocks/defaultBlocks";
|
|
31
31
|
import { FormattingToolbarProsemirrorPlugin } from "../extensions/FormattingToolbar/FormattingToolbarPlugin";
|
|
@@ -45,17 +45,17 @@ import {
|
|
|
45
45
|
BlockSchemaFromSpecs,
|
|
46
46
|
BlockSchemaWithBlock,
|
|
47
47
|
BlockSpecs,
|
|
48
|
-
getBlockSchemaFromSpecs,
|
|
49
|
-
getInlineContentSchemaFromSpecs,
|
|
50
|
-
getStyleSchemaFromSpecs,
|
|
51
48
|
InlineContentSchema,
|
|
52
49
|
InlineContentSchemaFromSpecs,
|
|
53
50
|
InlineContentSpecs,
|
|
54
51
|
PartialBlock,
|
|
55
|
-
Styles,
|
|
56
52
|
StyleSchema,
|
|
57
53
|
StyleSchemaFromSpecs,
|
|
58
54
|
StyleSpecs,
|
|
55
|
+
Styles,
|
|
56
|
+
getBlockSchemaFromSpecs,
|
|
57
|
+
getInlineContentSchemaFromSpecs,
|
|
58
|
+
getStyleSchemaFromSpecs,
|
|
59
59
|
} from "../schema";
|
|
60
60
|
import { mergeCSSClasses } from "../util/browser";
|
|
61
61
|
import { UnreachableCaseError } from "../util/typescript";
|
|
@@ -371,7 +371,7 @@ export class BlockNoteEditor<
|
|
|
371
371
|
jsonNode.content[0].content[0].attrs.id = "initialBlockId";
|
|
372
372
|
|
|
373
373
|
cache = Node.fromJSON(schema, jsonNode);
|
|
374
|
-
return
|
|
374
|
+
return cache;
|
|
375
375
|
};
|
|
376
376
|
|
|
377
377
|
const root = schema.node(
|
|
@@ -52,7 +52,8 @@ export class FormattingToolbarView {
|
|
|
52
52
|
|
|
53
53
|
pmView.dom.addEventListener("mousedown", this.viewMousedownHandler);
|
|
54
54
|
pmView.dom.addEventListener("mouseup", this.viewMouseupHandler);
|
|
55
|
-
pmView.dom.addEventListener("dragstart", this.
|
|
55
|
+
pmView.dom.addEventListener("dragstart", this.dragHandler);
|
|
56
|
+
pmView.dom.addEventListener("dragover", this.dragHandler);
|
|
56
57
|
|
|
57
58
|
pmView.dom.addEventListener("focus", this.focusHandler);
|
|
58
59
|
pmView.dom.addEventListener("blur", this.blurHandler);
|
|
@@ -70,7 +71,7 @@ export class FormattingToolbarView {
|
|
|
70
71
|
};
|
|
71
72
|
|
|
72
73
|
// For dragging the whole editor.
|
|
73
|
-
|
|
74
|
+
dragHandler = () => {
|
|
74
75
|
if (this.formattingToolbarState?.show) {
|
|
75
76
|
this.formattingToolbarState.show = false;
|
|
76
77
|
this.updateFormattingToolbar();
|
|
@@ -177,7 +178,8 @@ export class FormattingToolbarView {
|
|
|
177
178
|
destroy() {
|
|
178
179
|
this.pmView.dom.removeEventListener("mousedown", this.viewMousedownHandler);
|
|
179
180
|
this.pmView.dom.removeEventListener("mouseup", this.viewMouseupHandler);
|
|
180
|
-
this.pmView.dom.removeEventListener("dragstart", this.
|
|
181
|
+
this.pmView.dom.removeEventListener("dragstart", this.dragHandler);
|
|
182
|
+
this.pmView.dom.removeEventListener("dragover", this.dragHandler);
|
|
181
183
|
|
|
182
184
|
this.pmView.dom.removeEventListener("focus", this.focusHandler);
|
|
183
185
|
this.pmView.dom.removeEventListener("blur", this.blurHandler);
|
|
@@ -550,7 +550,10 @@ export class SideMenuView<
|
|
|
550
550
|
const { contentNode, startPos, endPos } = blockInfo;
|
|
551
551
|
|
|
552
552
|
// Creates a new block if current one is not empty for the suggestion menu to open in.
|
|
553
|
-
if (
|
|
553
|
+
if (
|
|
554
|
+
contentNode.type.spec.content !== "inline*" ||
|
|
555
|
+
contentNode.textContent.length !== 0
|
|
556
|
+
) {
|
|
554
557
|
const newBlockInsertionPos = endPos + 1;
|
|
555
558
|
const newBlockContentPos = newBlockInsertionPos + 2;
|
|
556
559
|
|
|
@@ -693,10 +693,6 @@ export const BlockContainer = Node.create<{
|
|
|
693
693
|
this.editor.commands.liftListItem("blockContainer");
|
|
694
694
|
return true;
|
|
695
695
|
},
|
|
696
|
-
"Mod-Alt-0": () =>
|
|
697
|
-
this.editor.commands.BNCreateBlock(
|
|
698
|
-
this.editor.state.selection.anchor + 2
|
|
699
|
-
),
|
|
700
696
|
};
|
|
701
697
|
},
|
|
702
698
|
});
|
|
@@ -2,7 +2,7 @@ import { EditorOptions } from "@tiptap/core";
|
|
|
2
2
|
import { Node } from "prosemirror-model";
|
|
3
3
|
import { Editor as TiptapEditor } from "@tiptap/core/dist/packages/core/src/Editor";
|
|
4
4
|
import * as Y from "yjs";
|
|
5
|
-
import { DefaultBlockSchema,
|
|
5
|
+
import { DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, defaultBlockSpecs, defaultInlineContentSpecs, defaultStyleSpecs } from "../blocks/defaultBlocks";
|
|
6
6
|
import { FormattingToolbarProsemirrorPlugin } from "../extensions/FormattingToolbar/FormattingToolbarPlugin";
|
|
7
7
|
import { HyperlinkToolbarProsemirrorPlugin } from "../extensions/HyperlinkToolbar/HyperlinkToolbarPlugin";
|
|
8
8
|
import { ImageToolbarProsemirrorPlugin } from "../extensions/ImageToolbar/ImageToolbarPlugin";
|
|
@@ -10,7 +10,7 @@ import { SideMenuProsemirrorPlugin } from "../extensions/SideMenu/SideMenuPlugin
|
|
|
10
10
|
import { BaseSlashMenuItem } from "../extensions/SlashMenu/BaseSlashMenuItem";
|
|
11
11
|
import { SlashMenuProsemirrorPlugin } from "../extensions/SlashMenu/SlashMenuPlugin";
|
|
12
12
|
import { TableHandlesProsemirrorPlugin } from "../extensions/TableHandles/TableHandlesPlugin";
|
|
13
|
-
import { Block, BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSchemaFromSpecs, BlockSchemaWithBlock, BlockSpecs, InlineContentSchema, InlineContentSchemaFromSpecs, InlineContentSpecs, PartialBlock,
|
|
13
|
+
import { Block, BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSchemaFromSpecs, BlockSchemaWithBlock, BlockSpecs, InlineContentSchema, InlineContentSchemaFromSpecs, InlineContentSpecs, PartialBlock, StyleSchema, StyleSchemaFromSpecs, StyleSpecs, Styles } from "../schema";
|
|
14
14
|
import { TextCursorPosition } from "./cursorPositionTypes";
|
|
15
15
|
import { Selection } from "./selectionTypes";
|
|
16
16
|
import "./Block.css";
|
|
@@ -23,7 +23,7 @@ export declare class FormattingToolbarView {
|
|
|
23
23
|
constructor(editor: BlockNoteEditor<BlockSchema, InlineContentSchema, StyleSchema>, pmView: EditorView, updateFormattingToolbar: (formattingToolbarState: FormattingToolbarState) => void);
|
|
24
24
|
viewMousedownHandler: () => void;
|
|
25
25
|
viewMouseupHandler: () => void;
|
|
26
|
-
|
|
26
|
+
dragHandler: () => void;
|
|
27
27
|
focusHandler: () => void;
|
|
28
28
|
blurHandler: (event: FocusEvent) => void;
|
|
29
29
|
scrollHandler: () => void;
|