update(codeblock & header)
This commit is contained in:
parent
37ebb1a6a6
commit
31e039d506
|
@ -89,6 +89,7 @@ class CodeBlcok<V extends CodeBlockValue = CodeBlockValue> extends Card<V> {
|
|||
}
|
||||
#viewAutoWrap?: boolean = undefined;
|
||||
toolbar(): Array<CardToolbarItemOptions | ToolbarItemOptions> {
|
||||
if (this.loading) return [];
|
||||
if (!isEngine(this.editor) || this.editor.readonly) {
|
||||
return [
|
||||
{ type: 'copy' },
|
||||
|
|
|
@ -86,6 +86,7 @@ class CodeBlcok<V extends CodeBlockValue = CodeBlockValue> extends Card<V> {
|
|||
}
|
||||
#viewAutoWrap?: boolean = undefined;
|
||||
toolbar(): Array<CardToolbarItemOptions | ToolbarItemOptions> {
|
||||
if (this.loading) return [];
|
||||
if (!isEngine(this.editor) || this.editor.readonly) {
|
||||
return [
|
||||
{ type: 'copy' },
|
||||
|
|
|
@ -114,11 +114,6 @@ export default class<T extends HeadingOptions> extends BlockPlugin<T> {
|
|||
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;
|
||||
|
|
|
@ -39,7 +39,7 @@ class Outline {
|
|||
if (!children) return [];
|
||||
let headings: Array<Element> = [];
|
||||
children.each((child) => {
|
||||
if (!filter[child.nodeName]) return;
|
||||
if (!filter[child.nodeName.toLowerCase()]) return;
|
||||
headings.push(child as Element);
|
||||
});
|
||||
return headings;
|
||||
|
|
Loading…
Reference in New Issue