@tiptap/core 2.1.0-rc.10 → 2.1.0-rc.12
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/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +4 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/cut.ts +3 -1
- package/src/commands/insertContentAt.ts +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1309,7 +1309,9 @@
|
|
|
1309
1309
|
return editor
|
|
1310
1310
|
.chain()
|
|
1311
1311
|
.deleteRange(originRange)
|
|
1312
|
-
.
|
|
1312
|
+
.command(({ commands, tr }) => {
|
|
1313
|
+
return commands.insertContentAt(tr.mapping.map(targetPos), contentSlice.content.toJSON());
|
|
1314
|
+
})
|
|
1313
1315
|
.focus()
|
|
1314
1316
|
.run();
|
|
1315
1317
|
};
|
|
@@ -1643,7 +1645,7 @@
|
|
|
1643
1645
|
if (content.toString() === '<>') {
|
|
1644
1646
|
return true;
|
|
1645
1647
|
}
|
|
1646
|
-
let { from, to } = typeof position === 'number' ? { from:
|
|
1648
|
+
let { from, to } = typeof position === 'number' ? { from: position, to: position } : { from: position.from, to: position.to };
|
|
1647
1649
|
let isOnlyTextContent = true;
|
|
1648
1650
|
let isOnlyBlockContent = true;
|
|
1649
1651
|
const nodes = isFragment(content) ? content : [content];
|