@tiptap/core 2.4.0 → 2.5.0-beta.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/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +4 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/packages/core/src/EventEmitter.d.ts +2 -2
- package/package.json +2 -2
- package/src/EventEmitter.ts +2 -2
- package/src/commands/joinItemBackward.ts +4 -2
- package/src/inputRules/nodeInputRule.ts +3 -1
package/dist/index.umd.js
CHANGED
|
@@ -1894,7 +1894,7 @@
|
|
|
1894
1894
|
return commands$1.joinForward(state, dispatch);
|
|
1895
1895
|
};
|
|
1896
1896
|
|
|
1897
|
-
const joinItemBackward = () => ({
|
|
1897
|
+
const joinItemBackward = () => ({ state, dispatch, tr, }) => {
|
|
1898
1898
|
try {
|
|
1899
1899
|
const point = transform.joinPoint(state.doc, state.selection.$from.pos, -1);
|
|
1900
1900
|
if (point === null || point === undefined) {
|
|
@@ -1906,7 +1906,7 @@
|
|
|
1906
1906
|
}
|
|
1907
1907
|
return true;
|
|
1908
1908
|
}
|
|
1909
|
-
catch {
|
|
1909
|
+
catch (e) {
|
|
1910
1910
|
return false;
|
|
1911
1911
|
}
|
|
1912
1912
|
};
|
|
@@ -4314,7 +4314,8 @@ img.ProseMirror-separator {
|
|
|
4314
4314
|
tr.replaceWith(matchStart, end, newNode);
|
|
4315
4315
|
}
|
|
4316
4316
|
else if (match[0]) {
|
|
4317
|
-
|
|
4317
|
+
const insertionStart = config.type.isInline ? start : start - 1;
|
|
4318
|
+
tr.insert(insertionStart, config.type.create(attributes)).delete(tr.mapping.map(start), tr.mapping.map(end));
|
|
4318
4319
|
}
|
|
4319
4320
|
tr.scrollIntoView();
|
|
4320
4321
|
},
|