mirror of
https://github.com/fantasticit/think.git
synced 2026-09-01 15:10:55 +08:00
fix js error
This commit is contained in:
@@ -10,6 +10,8 @@ export const Dragable = Extension.create({
|
||||
name: 'dragable',
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
if (!this.editor.isEditable) return [];
|
||||
|
||||
let editorView: EditorView;
|
||||
let dragHandleDOM: HTMLElement;
|
||||
let activeNode: ActiveNode;
|
||||
@@ -25,13 +27,13 @@ export const Dragable = Extension.create({
|
||||
};
|
||||
|
||||
const showDragHandleDOM = () => {
|
||||
dragHandleDOM.classList.add('show');
|
||||
dragHandleDOM.classList.remove('hide');
|
||||
dragHandleDOM?.classList?.add('show');
|
||||
dragHandleDOM?.classList?.remove('hide');
|
||||
};
|
||||
|
||||
const hideDragHandleDOM = () => {
|
||||
dragHandleDOM.classList.remove('show');
|
||||
dragHandleDOM.classList.add('hide');
|
||||
dragHandleDOM?.classList?.remove('show');
|
||||
dragHandleDOM?.classList?.add('hide');
|
||||
};
|
||||
|
||||
const renderDragHandleDOM = (view: EditorView, el: HTMLElement) => {
|
||||
|
||||
Reference in New Issue
Block a user