fix: remove unused code

This commit is contained in:
fantasticit 2022-05-06 23:58:14 +08:00
parent 009d7782a4
commit 833e845503
2 changed files with 1 additions and 5 deletions

View File

@ -416,7 +416,7 @@ MindElixir.prototype = {
},
destroy: function () {
this.bus.destroy();
this.bus && this.bus.destroy();
},
};

View File

@ -2,8 +2,6 @@ import { Editor } from '@tiptap/core';
import { Node, Fragment } from 'prosemirror-model';
import { copy } from 'helpers/copy';
import { safeJSONStringify } from 'helpers/json';
// import { prosemirrorToMarkdown } from 'tiptap/_markdown/prosemirror-to-markdown';
// import { markdownToHTML } from 'tiptap/markdown/markdown-to-prosemirror/markdown-to-html';
export function copyNode(nodeOrNodeName: Node);
export function copyNode(nodeOrNodeName: string, editor: Editor);
@ -39,8 +37,6 @@ export function copyNode(nodeOrNodeName: string | Node, editor?: Editor) {
toCopy.push({ text: targetNode.textContent, format: 'text/plain' });
}
console.log('copy', editor);
try {
const { markdownToHTML, prosemirrorToMarkdown } = editor.extensionStorage['paste'];
const markdown = prosemirrorToMarkdown({ content: Fragment.from(targetNode) });