mirror of
https://github.com/fantasticit/think.git
synced 2026-10-31 07:09:04 +08:00
tiptap: hide drag handler in topNode
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user