on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
27 lines (26 loc) • 799 B
JavaScript
var a = Object.defineProperty;
var i = (t, o, r) => o in t ? a(t, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[o] = r;
var e = (t, o, r) => i(t, typeof o != "symbol" ? o + "" : o, r);
/* empty css */
/* empty css */
import { createContainer as l } from "../../utils/helpers.mjs";
class c {
constructor() {
e(this, "name", "toolbar");
e(this, "toolbar", null);
}
initialize(o) {
this.createToolbar();
}
createToolbar() {
this.toolbar = l("editor-toolbar");
const o = document.querySelector(".html-editor");
o != null && o.parentNode && this.toolbar && o.parentNode.insertBefore(this.toolbar, o);
}
destroy() {
this.toolbar && (this.toolbar.remove(), this.toolbar = null);
}
}
export {
c as ToolbarPlugin
};