diff --git a/plugins/codeblock-vue/src/component/index.ts b/plugins/codeblock-vue/src/component/index.ts index ef8705d1..384d13bf 100644 --- a/plugins/codeblock-vue/src/component/index.ts +++ b/plugins/codeblock-vue/src/component/index.ts @@ -89,6 +89,7 @@ class CodeBlcok extends Card { } #viewAutoWrap?: boolean = undefined; toolbar(): Array { + if (this.loading) return []; if (!isEngine(this.editor) || this.editor.readonly) { return [ { type: 'copy' }, diff --git a/plugins/codeblock/src/component/index.ts b/plugins/codeblock/src/component/index.ts index 455b522d..cfc50a88 100644 --- a/plugins/codeblock/src/component/index.ts +++ b/plugins/codeblock/src/component/index.ts @@ -86,6 +86,7 @@ class CodeBlcok extends Card { } #viewAutoWrap?: boolean = undefined; toolbar(): Array { + if (this.loading) return []; if (!isEngine(this.editor) || this.editor.readonly) { return [ { type: 'copy' }, diff --git a/plugins/heading/src/index.ts b/plugins/heading/src/index.ts index f7d4cc45..fdbd7050 100644 --- a/plugins/heading/src/index.ts +++ b/plugins/heading/src/index.ts @@ -114,11 +114,6 @@ export default class extends BlockPlugin { this.editor.on('paste:markdown', (child) => this.pasteMarkdown(child), ); - this.editor.on('paste:each', (node) => { - if (this.tagName.indexOf(node.name) > -1) { - node.attributes('id', ''); - } - }); } //引擎处理 if (!isEngine(this.editor) || this.options.showAnchor === false) return; diff --git a/plugins/heading/src/outline.ts b/plugins/heading/src/outline.ts index 7c57e649..f5490aa7 100644 --- a/plugins/heading/src/outline.ts +++ b/plugins/heading/src/outline.ts @@ -39,7 +39,7 @@ class Outline { if (!children) return []; let headings: Array = []; children.each((child) => { - if (!filter[child.nodeName]) return; + if (!filter[child.nodeName.toLowerCase()]) return; headings.push(child as Element); }); return headings;