@blocknote/core 0.50.0 → 0.51.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 +1 -1
- package/dist/blocknote.js +4 -4
- package/dist/{blocks-UU7EM-QM.js → blocks-D0lMxErU.js} +397 -368
- package/dist/blocks-D0lMxErU.js.map +1 -0
- package/dist/blocks-KyMOxPT3.cjs +11 -0
- package/dist/blocks-KyMOxPT3.cjs.map +1 -0
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.js +2 -2
- package/dist/{extensions-CkLT--Nc.js → extensions-CQFfm5f5.js} +619 -353
- package/dist/extensions-CQFfm5f5.js.map +1 -0
- package/dist/extensions-Cuw3zOdC.cjs +52 -0
- package/dist/extensions-Cuw3zOdC.cjs.map +1 -0
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.js +3 -3
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +1 -1
- package/dist/locales.js.map +1 -1
- package/dist/{src-SVFpMAWE.js → src-DK_8q1j5.js} +1070 -564
- package/dist/src-DK_8q1j5.js.map +1 -0
- package/dist/src-_83jmA7A.cjs +21 -0
- package/dist/src-_83jmA7A.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/dist/yjs.cjs +1 -1
- package/dist/yjs.js +8 -8
- package/package.json +1 -13
- package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +7 -7
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +5 -3
- package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +5 -5
- package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +2550 -291
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +83 -2
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +103 -42
- package/src/api/blockManipulation/commands/nestBlock/__snapshots__/nestBlock.test.ts.snap +0 -143
- package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +12 -12
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +5 -3
- package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +6 -6
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +22 -22
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +12 -8
- package/src/api/blockManipulation/setupTestEnv.ts +1 -1
- package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +2 -6
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +7 -2
- package/src/api/exporters/markdown/htmlToMarkdown.ts +813 -0
- package/src/api/exporters/markdown/markdownExporter.ts +2 -21
- package/src/api/nodeConversions/blockToNode.ts +3 -2
- package/src/api/parsers/html/util/__snapshots__/nestedLists.test.ts.snap +122 -107
- package/src/api/parsers/html/util/nestedLists.test.ts +1 -12
- package/src/api/parsers/markdown/markdownToHtml.ts +1194 -0
- package/src/api/parsers/markdown/parseMarkdown.ts +2 -101
- package/src/blocks/Audio/block.ts +1 -4
- package/src/blocks/Code/block.test.ts +258 -0
- package/src/blocks/File/block.ts +1 -4
- package/src/blocks/File/helpers/render/createFileBlockWrapper.ts +7 -2
- package/src/blocks/Image/block.ts +9 -6
- package/src/blocks/ListItem/BulletListItem/block.ts +7 -4
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +3 -4
- package/src/blocks/Video/block.ts +4 -5
- package/src/blocks/Video/parseVideoElement.ts +2 -1
- package/src/editor/Block.css +8 -0
- package/src/editor/BlockNoteEditor.test.ts +10 -4
- package/src/editor/BlockNoteEditor.ts +30 -13
- package/src/editor/managers/BlockManager.ts +10 -6
- package/src/editor/managers/ExtensionManager/index.ts +80 -25
- package/src/editor/performance.test.ts +2 -2
- package/src/editor/transformPasted.test.ts +295 -0
- package/src/editor/transformPasted.ts +77 -0
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +1 -12
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +0 -11
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -1
- package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -1
- package/src/extensions/SideMenu/dragging.ts +7 -10
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +21 -0
- package/src/extensions/TrailingNode/TrailingNode.ts +124 -65
- package/src/i18n/locales/fr.ts +1 -1
- package/types/src/api/blockManipulation/commands/moveBlocks/moveBlocks.d.ts +13 -2
- package/types/src/api/clipboard/fromClipboard/handleVSCodePaste.d.ts +1 -1
- package/types/src/api/exporters/markdown/htmlToMarkdown.d.ts +11 -0
- package/types/src/api/parsers/markdown/markdownToHtml.d.ts +5 -0
- package/types/src/blocks/Code/block.test.d.ts +1 -0
- package/types/src/blocks/Video/block.d.ts +2 -0
- package/types/src/blocks/Video/parseVideoElement.d.ts +1 -0
- package/types/src/editor/BlockNoteEditor.d.ts +20 -6
- package/types/src/editor/managers/BlockManager.d.ts +8 -4
- package/types/src/editor/transformPasted.test.d.ts +1 -0
- package/types/src/extensions/TrailingNode/TrailingNode.d.ts +8 -3
- package/dist/blocks-BFnTypT-.cjs +0 -11
- package/dist/blocks-BFnTypT-.cjs.map +0 -1
- package/dist/blocks-UU7EM-QM.js.map +0 -1
- package/dist/extensions-CYsFi5Is.cjs +0 -2
- package/dist/extensions-CYsFi5Is.cjs.map +0 -1
- package/dist/extensions-CkLT--Nc.js.map +0 -1
- package/dist/src-DsJ6yzs9.cjs +0 -5
- package/dist/src-DsJ6yzs9.cjs.map +0 -1
- package/dist/src-SVFpMAWE.js.map +0 -1
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +0 -42
- package/src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.ts +0 -19
- package/src/api/exporters/markdown/util/removeUnderlinesRehypePlugin.ts +0 -39
- package/types/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.d.ts +0 -7
- package/types/src/api/exporters/markdown/util/convertVideoToMarkdownRehypePlugin.d.ts +0 -2
- package/types/src/api/exporters/markdown/util/removeUnderlinesRehypePlugin.d.ts +0 -6
|
@@ -574,7 +574,7 @@ exports[`Test splitBlocks > Basic 1`] = `
|
|
|
574
574
|
{
|
|
575
575
|
"children": [],
|
|
576
576
|
"content": [],
|
|
577
|
-
"id": "
|
|
577
|
+
"id": "paragraph-9",
|
|
578
578
|
"props": {
|
|
579
579
|
"backgroundColor": "default",
|
|
580
580
|
"textAlignment": "left",
|
|
@@ -1159,7 +1159,7 @@ exports[`Test splitBlocks > Block has children 1`] = `
|
|
|
1159
1159
|
{
|
|
1160
1160
|
"children": [],
|
|
1161
1161
|
"content": [],
|
|
1162
|
-
"id": "
|
|
1162
|
+
"id": "paragraph-9",
|
|
1163
1163
|
"props": {
|
|
1164
1164
|
"backgroundColor": "default",
|
|
1165
1165
|
"textAlignment": "left",
|
|
@@ -1744,7 +1744,7 @@ exports[`Test splitBlocks > Don't keep props 1`] = `
|
|
|
1744
1744
|
{
|
|
1745
1745
|
"children": [],
|
|
1746
1746
|
"content": [],
|
|
1747
|
-
"id": "
|
|
1747
|
+
"id": "paragraph-9",
|
|
1748
1748
|
"props": {
|
|
1749
1749
|
"backgroundColor": "default",
|
|
1750
1750
|
"textAlignment": "left",
|
|
@@ -2329,7 +2329,7 @@ exports[`Test splitBlocks > Don't keep type 1`] = `
|
|
|
2329
2329
|
{
|
|
2330
2330
|
"children": [],
|
|
2331
2331
|
"content": [],
|
|
2332
|
-
"id": "
|
|
2332
|
+
"id": "paragraph-9",
|
|
2333
2333
|
"props": {
|
|
2334
2334
|
"backgroundColor": "default",
|
|
2335
2335
|
"textAlignment": "left",
|
|
@@ -2908,7 +2908,7 @@ exports[`Test splitBlocks > End of content 1`] = `
|
|
|
2908
2908
|
{
|
|
2909
2909
|
"children": [],
|
|
2910
2910
|
"content": [],
|
|
2911
|
-
"id": "
|
|
2911
|
+
"id": "paragraph-9",
|
|
2912
2912
|
"props": {
|
|
2913
2913
|
"backgroundColor": "default",
|
|
2914
2914
|
"textAlignment": "left",
|
|
@@ -3495,7 +3495,7 @@ exports[`Test splitBlocks > Keep type 1`] = `
|
|
|
3495
3495
|
{
|
|
3496
3496
|
"children": [],
|
|
3497
3497
|
"content": [],
|
|
3498
|
-
"id": "
|
|
3498
|
+
"id": "paragraph-9",
|
|
3499
3499
|
"props": {
|
|
3500
3500
|
"backgroundColor": "default",
|
|
3501
3501
|
"textAlignment": "left",
|
package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap
CHANGED
|
@@ -629,7 +629,7 @@ exports[`Test updateBlock > Revert all props 2`] = `
|
|
|
629
629
|
{
|
|
630
630
|
"children": [],
|
|
631
631
|
"content": [],
|
|
632
|
-
"id": "
|
|
632
|
+
"id": "paragraph-9",
|
|
633
633
|
"props": {
|
|
634
634
|
"backgroundColor": "default",
|
|
635
635
|
"textAlignment": "left",
|
|
@@ -1269,7 +1269,7 @@ exports[`Test updateBlock > Revert single prop 2`] = `
|
|
|
1269
1269
|
{
|
|
1270
1270
|
"children": [],
|
|
1271
1271
|
"content": [],
|
|
1272
|
-
"id": "
|
|
1272
|
+
"id": "paragraph-9",
|
|
1273
1273
|
"props": {
|
|
1274
1274
|
"backgroundColor": "default",
|
|
1275
1275
|
"textAlignment": "left",
|
|
@@ -1909,7 +1909,7 @@ exports[`Test updateBlock > Update all props 2`] = `
|
|
|
1909
1909
|
{
|
|
1910
1910
|
"children": [],
|
|
1911
1911
|
"content": [],
|
|
1912
|
-
"id": "
|
|
1912
|
+
"id": "paragraph-9",
|
|
1913
1913
|
"props": {
|
|
1914
1914
|
"backgroundColor": "default",
|
|
1915
1915
|
"textAlignment": "left",
|
|
@@ -2549,7 +2549,7 @@ exports[`Test updateBlock > Update children 2`] = `
|
|
|
2549
2549
|
{
|
|
2550
2550
|
"children": [],
|
|
2551
2551
|
"content": [],
|
|
2552
|
-
"id": "
|
|
2552
|
+
"id": "paragraph-9",
|
|
2553
2553
|
"props": {
|
|
2554
2554
|
"backgroundColor": "default",
|
|
2555
2555
|
"textAlignment": "left",
|
|
@@ -3131,7 +3131,7 @@ exports[`Test updateBlock > Update inline content to no content 2`] = `
|
|
|
3131
3131
|
{
|
|
3132
3132
|
"children": [],
|
|
3133
3133
|
"content": [],
|
|
3134
|
-
"id": "
|
|
3134
|
+
"id": "paragraph-9",
|
|
3135
3135
|
"props": {
|
|
3136
3136
|
"backgroundColor": "default",
|
|
3137
3137
|
"textAlignment": "left",
|
|
@@ -4055,7 +4055,7 @@ exports[`Test updateBlock > Update inline content to table content 2`] = `
|
|
|
4055
4055
|
{
|
|
4056
4056
|
"children": [],
|
|
4057
4057
|
"content": [],
|
|
4058
|
-
"id": "
|
|
4058
|
+
"id": "paragraph-9",
|
|
4059
4059
|
"props": {
|
|
4060
4060
|
"backgroundColor": "default",
|
|
4061
4061
|
"textAlignment": "left",
|
|
@@ -4634,7 +4634,7 @@ exports[`Test updateBlock > Update no content to empty inline content 2`] = `
|
|
|
4634
4634
|
{
|
|
4635
4635
|
"children": [],
|
|
4636
4636
|
"content": [],
|
|
4637
|
-
"id": "
|
|
4637
|
+
"id": "paragraph-9",
|
|
4638
4638
|
"props": {
|
|
4639
4639
|
"backgroundColor": "default",
|
|
4640
4640
|
"textAlignment": "left",
|
|
@@ -5217,7 +5217,7 @@ exports[`Test updateBlock > Update no content to empty table content 2`] = `
|
|
|
5217
5217
|
{
|
|
5218
5218
|
"children": [],
|
|
5219
5219
|
"content": [],
|
|
5220
|
-
"id": "
|
|
5220
|
+
"id": "paragraph-9",
|
|
5221
5221
|
"props": {
|
|
5222
5222
|
"backgroundColor": "default",
|
|
5223
5223
|
"textAlignment": "left",
|
|
@@ -5808,7 +5808,7 @@ exports[`Test updateBlock > Update no content to inline content 2`] = `
|
|
|
5808
5808
|
{
|
|
5809
5809
|
"children": [],
|
|
5810
5810
|
"content": [],
|
|
5811
|
-
"id": "
|
|
5811
|
+
"id": "paragraph-9",
|
|
5812
5812
|
"props": {
|
|
5813
5813
|
"backgroundColor": "default",
|
|
5814
5814
|
"textAlignment": "left",
|
|
@@ -6735,7 +6735,7 @@ exports[`Test updateBlock > Update no content to table content 2`] = `
|
|
|
6735
6735
|
{
|
|
6736
6736
|
"children": [],
|
|
6737
6737
|
"content": [],
|
|
6738
|
-
"id": "
|
|
6738
|
+
"id": "paragraph-9",
|
|
6739
6739
|
"props": {
|
|
6740
6740
|
"backgroundColor": "default",
|
|
6741
6741
|
"textAlignment": "left",
|
|
@@ -7303,7 +7303,7 @@ exports[`Test updateBlock > Update partial (offset start + end) 1`] = `
|
|
|
7303
7303
|
{
|
|
7304
7304
|
"children": [],
|
|
7305
7305
|
"content": [],
|
|
7306
|
-
"id": "
|
|
7306
|
+
"id": "paragraph-9",
|
|
7307
7307
|
"props": {
|
|
7308
7308
|
"backgroundColor": "default",
|
|
7309
7309
|
"textAlignment": "left",
|
|
@@ -7864,7 +7864,7 @@ exports[`Test updateBlock > Update partial (offset start) 1`] = `
|
|
|
7864
7864
|
{
|
|
7865
7865
|
"children": [],
|
|
7866
7866
|
"content": [],
|
|
7867
|
-
"id": "
|
|
7867
|
+
"id": "paragraph-9",
|
|
7868
7868
|
"props": {
|
|
7869
7869
|
"backgroundColor": "default",
|
|
7870
7870
|
"textAlignment": "left",
|
|
@@ -8425,7 +8425,7 @@ exports[`Test updateBlock > Update partial (props + offset end) 1`] = `
|
|
|
8425
8425
|
{
|
|
8426
8426
|
"children": [],
|
|
8427
8427
|
"content": [],
|
|
8428
|
-
"id": "
|
|
8428
|
+
"id": "paragraph-9",
|
|
8429
8429
|
"props": {
|
|
8430
8430
|
"backgroundColor": "default",
|
|
8431
8431
|
"textAlignment": "left",
|
|
@@ -8993,7 +8993,7 @@ exports[`Test updateBlock > Update partial (table cell) 1`] = `
|
|
|
8993
8993
|
{
|
|
8994
8994
|
"children": [],
|
|
8995
8995
|
"content": [],
|
|
8996
|
-
"id": "
|
|
8996
|
+
"id": "paragraph-9",
|
|
8997
8997
|
"props": {
|
|
8998
8998
|
"backgroundColor": "default",
|
|
8999
8999
|
"textAlignment": "left",
|
|
@@ -9561,7 +9561,7 @@ exports[`Test updateBlock > Update partial (table row) 1`] = `
|
|
|
9561
9561
|
{
|
|
9562
9562
|
"children": [],
|
|
9563
9563
|
"content": [],
|
|
9564
|
-
"id": "
|
|
9564
|
+
"id": "paragraph-9",
|
|
9565
9565
|
"props": {
|
|
9566
9566
|
"backgroundColor": "default",
|
|
9567
9567
|
"textAlignment": "left",
|
|
@@ -10201,7 +10201,7 @@ exports[`Test updateBlock > Update single prop 2`] = `
|
|
|
10201
10201
|
{
|
|
10202
10202
|
"children": [],
|
|
10203
10203
|
"content": [],
|
|
10204
|
-
"id": "
|
|
10204
|
+
"id": "paragraph-9",
|
|
10205
10205
|
"props": {
|
|
10206
10206
|
"backgroundColor": "default",
|
|
10207
10207
|
"textAlignment": "left",
|
|
@@ -10609,7 +10609,7 @@ exports[`Test updateBlock > Update table content to empty inline content 2`] = `
|
|
|
10609
10609
|
{
|
|
10610
10610
|
"children": [],
|
|
10611
10611
|
"content": [],
|
|
10612
|
-
"id": "
|
|
10612
|
+
"id": "paragraph-9",
|
|
10613
10613
|
"props": {
|
|
10614
10614
|
"backgroundColor": "default",
|
|
10615
10615
|
"textAlignment": "left",
|
|
@@ -11029,7 +11029,7 @@ exports[`Test updateBlock > Update table content to inline content 2`] = `
|
|
|
11029
11029
|
{
|
|
11030
11030
|
"children": [],
|
|
11031
11031
|
"content": [],
|
|
11032
|
-
"id": "
|
|
11032
|
+
"id": "paragraph-9",
|
|
11033
11033
|
"props": {
|
|
11034
11034
|
"backgroundColor": "default",
|
|
11035
11035
|
"textAlignment": "left",
|
|
@@ -11443,7 +11443,7 @@ exports[`Test updateBlock > Update table content to no content 2`] = `
|
|
|
11443
11443
|
{
|
|
11444
11444
|
"children": [],
|
|
11445
11445
|
"content": [],
|
|
11446
|
-
"id": "
|
|
11446
|
+
"id": "paragraph-9",
|
|
11447
11447
|
"props": {
|
|
11448
11448
|
"backgroundColor": "default",
|
|
11449
11449
|
"textAlignment": "left",
|
|
@@ -12079,7 +12079,7 @@ exports[`Test updateBlock > Update type 2`] = `
|
|
|
12079
12079
|
{
|
|
12080
12080
|
"children": [],
|
|
12081
12081
|
"content": [],
|
|
12082
|
-
"id": "
|
|
12082
|
+
"id": "paragraph-9",
|
|
12083
12083
|
"props": {
|
|
12084
12084
|
"backgroundColor": "default",
|
|
12085
12085
|
"textAlignment": "left",
|
|
@@ -12691,7 +12691,7 @@ exports[`Test updateBlock > Update with plain content 2`] = `
|
|
|
12691
12691
|
{
|
|
12692
12692
|
"children": [],
|
|
12693
12693
|
"content": [],
|
|
12694
|
-
"id": "
|
|
12694
|
+
"id": "paragraph-9",
|
|
12695
12695
|
"props": {
|
|
12696
12696
|
"backgroundColor": "default",
|
|
12697
12697
|
"textAlignment": "left",
|
|
@@ -13331,7 +13331,7 @@ exports[`Test updateBlock > Update with styled content 2`] = `
|
|
|
13331
13331
|
{
|
|
13332
13332
|
"children": [],
|
|
13333
13333
|
"content": [],
|
|
13334
|
-
"id": "
|
|
13334
|
+
"id": "paragraph-9",
|
|
13335
13335
|
"props": {
|
|
13336
13336
|
"backgroundColor": "default",
|
|
13337
13337
|
"textAlignment": "left",
|
|
@@ -128,16 +128,18 @@ export function updateBlockTr<
|
|
|
128
128
|
// for this, we do a nodeToBlock on the existing block to get the children.
|
|
129
129
|
// it would be cleaner to use a ReplaceAroundStep, but this is a bit simpler and it's quite an edge case
|
|
130
130
|
const existingBlock = nodeToBlock(blockInfo.bnBlock.node, pmSchema);
|
|
131
|
+
const replacementNode = blockToNode(
|
|
132
|
+
{
|
|
133
|
+
children: existingBlock.children, // if no children are passed in, use existing children
|
|
134
|
+
...block,
|
|
135
|
+
},
|
|
136
|
+
pmSchema,
|
|
137
|
+
);
|
|
138
|
+
replacementNode.check(); // `blockToNode` is lenient; validate before mutating the doc
|
|
131
139
|
tr.replaceWith(
|
|
132
140
|
blockInfo.bnBlock.beforePos,
|
|
133
141
|
blockInfo.bnBlock.afterPos,
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
children: existingBlock.children, // if no children are passed in, use existing children
|
|
137
|
-
...block,
|
|
138
|
-
},
|
|
139
|
-
pmSchema,
|
|
140
|
-
),
|
|
142
|
+
replacementNode,
|
|
141
143
|
);
|
|
142
144
|
|
|
143
145
|
return;
|
|
@@ -278,7 +280,9 @@ function updateChildren<
|
|
|
278
280
|
const pmSchema = getPmSchema(tr);
|
|
279
281
|
if (block.children !== undefined && block.children.length > 0) {
|
|
280
282
|
const childNodes = block.children.map((child) => {
|
|
281
|
-
|
|
283
|
+
const node = blockToNode(child, pmSchema);
|
|
284
|
+
node.check(); // `blockToNode` is lenient; validate before mutating the doc
|
|
285
|
+
return node;
|
|
282
286
|
});
|
|
283
287
|
|
|
284
288
|
// Checks if a blockGroup node already exists.
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { EditorView } from "prosemirror-view";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
event: ClipboardEvent,
|
|
5
|
-
view: EditorView,
|
|
6
|
-
) {
|
|
3
|
+
export function handleVSCodePaste(event: ClipboardEvent, view: EditorView) {
|
|
7
4
|
const { schema } = view.state;
|
|
8
5
|
|
|
9
6
|
if (!event.clipboardData) {
|
|
@@ -17,8 +14,7 @@ export async function handleVSCodePaste(
|
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
if (!schema.nodes.codeBlock) {
|
|
20
|
-
|
|
21
|
-
return true;
|
|
17
|
+
return false;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
const vscode = event.clipboardData!.getData("vscode-editor-data");
|
|
@@ -57,8 +57,13 @@ function defaultPasteHandler({
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (format === "vscode-editor-data") {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
// If VSCode clipboard data cannot be parsed as a code block, try parsing
|
|
61
|
+
// `text/plain` as a fallback.
|
|
62
|
+
if (handleVSCodePaste(event, editor.prosemirrorView)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
format = "text/plain";
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
if (format === "Files") {
|