mirror of https://github.com/fantasticit/think.git
tiptap: hide drag handler in topNode
parent
1f2b4819d8
commit
dbf87fec68
|
@ -145,10 +145,11 @@ export const Dragable = Extension.create({
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = selectRootNodeByDom(dom, view);
|
const result = selectRootNodeByDom(dom, view);
|
||||||
activeNode = result;
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!result ||
|
!result ||
|
||||||
|
result.node.type.name === 'doc' ||
|
||||||
|
result.node.type.name === 'documentWithTitle' ||
|
||||||
result.node.type.name === 'title' ||
|
result.node.type.name === 'title' ||
|
||||||
result.node.type.name === 'tableOfContents' ||
|
result.node.type.name === 'tableOfContents' ||
|
||||||
// empty paragraph
|
// empty paragraph
|
||||||
|
@ -159,6 +160,8 @@ export const Dragable = Extension.create({
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
activeNode = result;
|
||||||
|
|
||||||
renderDragHandleDOM(view, result.el);
|
renderDragHandleDOM(view, result.el);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue