添加插入数学公式菜单
This commit is contained in:
@@ -55,6 +55,7 @@ import { Audio } from "./insert/Audio.ts";
|
||||
import { HardBreak } from "./insert/HardBreak.ts";
|
||||
import { Emoji } from "./insert/Emoji.ts";
|
||||
import { Symbol } from "./insert/Symbol.ts";
|
||||
import { Math } from "./insert/Math.ts";
|
||||
|
||||
/**
|
||||
* 经典菜单栏
|
||||
@@ -120,6 +121,7 @@ export class Ribbon extends HTMLElement implements UAIEditorEventListener {
|
||||
insertMenuHardBreak!: HardBreak;
|
||||
insertMenuEmoji!: Emoji;
|
||||
insertMenuSymbol!: Symbol;
|
||||
insertMenuMath!: Math;
|
||||
|
||||
constructor(defaultToolbarMenus: Record<string, any>[]) {
|
||||
super();
|
||||
@@ -330,6 +332,9 @@ export class Ribbon extends HTMLElement implements UAIEditorEventListener {
|
||||
|
||||
this.insertMenuSymbol = new Symbol({ menuType: "popup", enable: true, huge: true, hideText: false });
|
||||
this.eventComponents.push(this.insertMenuSymbol);
|
||||
|
||||
this.insertMenuMath = new Math({ menuType: "button", enable: true, huge: true });
|
||||
this.eventComponents.push(this.insertMenuMath);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,5 +497,6 @@ export class Ribbon extends HTMLElement implements UAIEditorEventListener {
|
||||
group2.appendChild(this.insertMenuHardBreak);
|
||||
group2.appendChild(this.insertMenuEmoji);
|
||||
group2.appendChild(this.insertMenuSymbol);
|
||||
group2.appendChild(this.insertMenuMath);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user