@tiptap/core 3.17.0 → 3.17.1
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/NodePos.ts +8 -3
- package/src/lib/ResizableNodeView.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4454,19 +4454,20 @@ var NodePos = class _NodePos {
|
|
|
4454
4454
|
this.node.content.forEach((node, offset) => {
|
|
4455
4455
|
const isBlock = node.isBlock && !node.isTextblock;
|
|
4456
4456
|
const isNonTextAtom = node.isAtom && !node.isText;
|
|
4457
|
+
const isInline = node.isInline;
|
|
4457
4458
|
const targetPos = this.pos + offset + (isNonTextAtom ? 0 : 1);
|
|
4458
4459
|
if (targetPos < 0 || targetPos > this.resolvedPos.doc.nodeSize - 2) {
|
|
4459
4460
|
return;
|
|
4460
4461
|
}
|
|
4461
4462
|
const $pos = this.resolvedPos.doc.resolve(targetPos);
|
|
4462
|
-
if (!isBlock && $pos.depth <= this.depth) {
|
|
4463
|
+
if (!isBlock && !isInline && $pos.depth <= this.depth) {
|
|
4463
4464
|
return;
|
|
4464
4465
|
}
|
|
4465
|
-
const childNodePos = new _NodePos($pos, this.editor, isBlock, isBlock ? node : null);
|
|
4466
|
+
const childNodePos = new _NodePos($pos, this.editor, isBlock, isBlock || isInline ? node : null);
|
|
4466
4467
|
if (isBlock) {
|
|
4467
4468
|
childNodePos.actualDepth = this.depth + 1;
|
|
4468
4469
|
}
|
|
4469
|
-
children.push(
|
|
4470
|
+
children.push(childNodePos);
|
|
4470
4471
|
});
|
|
4471
4472
|
return children;
|
|
4472
4473
|
}
|
|
@@ -5542,7 +5543,8 @@ var ResizableNodeView = class {
|
|
|
5542
5543
|
return this.container;
|
|
5543
5544
|
}
|
|
5544
5545
|
get contentDOM() {
|
|
5545
|
-
|
|
5546
|
+
var _a;
|
|
5547
|
+
return (_a = this.contentElement) != null ? _a : null;
|
|
5546
5548
|
}
|
|
5547
5549
|
handleEditorUpdate() {
|
|
5548
5550
|
const isEditable = this.editor.isEditable;
|