import {Constants} from "../constants"; import {setCodeTheme} from "../ui/setCodeTheme"; import {getEventName} from "../util/compatibility"; import {MenuItem} from "./MenuItem"; import {hidePanel, toggleSubMenu} from "./setToolbar"; export class CodeTheme extends MenuItem { public element: HTMLElement; constructor(vditor: IVditor, menuItem: IMenuItem) { super(vditor, menuItem); const actionBtn = this.element.children[0] as HTMLElement; const panelElement = document.createElement("div"); panelElement.className = `vditor-hint${menuItem.level === 2 ? "" : " vditor-panel--arrow"}`; let innerHTML = ""; Constants.CODE_THEME.forEach((theme) => { innerHTML += ``; }); panelElement.innerHTML = `