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