import mceConsole from "./editor-libs/console.js"; import * as mceEvents from "./editor-libs/events.js"; import * as mceUtils from "./editor-libs/mce-utils.js"; import * as tabby from "./editor-libs/tabby.js"; import { getEditorContent } from "./editor-libs/codemirror-editor.js"; import { isMathMLSupported } from "./editor-libs/feature-detector.js"; import "../css/editor-libs/ui-fonts.css"; import "../css/editor-libs/common.css"; import "../css/editor-libs/shadow-fonts.css"; import "../css/editor-libs/tabby.css"; import "../css/tabbed-editor.css"; (function () { const clearConsole = document.getElementById("clear") as HTMLElement; const editorContainer = document.getElementById( "editor-container", ) as HTMLElement; const tabContainer = document.getElementById("tab-container") as HTMLElement; const iframeContainer = document.getElementById("output") as HTMLElement; const header = document.querySelector(".output-header") as HTMLElement; const cssEditor = document.getElementById("css-editor") as HTMLElement; const htmlEditor = document.getElementById("html-editor") as HTMLElement; const jsEditor = document.getElementById("js-editor") as HTMLElement; const staticCSSCode = cssEditor.querySelector("pre") as HTMLPreElement; const staticHTMLCode = htmlEditor.querySelector("pre") as HTMLPreElement; const staticJSCode = jsEditor.querySelector("pre") as HTMLPreElement; const outputIFrame = document.getElementById( "output-iframe", ) as HTMLIFrameElement; const outputTemplate = getOutputTemplate(); const editorType = editorContainer.dataset.editorType; let appliedHeightAdjustment = false; let timer: NodeJS.Timeout | undefined; /** * @returns {string} - Interactive example output template, formed by joining together contents of #output-head and #output-body, found in live-tabbed-tmpl.html */ function getOutputTemplate() { /* Document is split into two templates, just because