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
3 lines (2 loc) • 1.08 kB
JavaScript
/*! on-codemerge v1.3.1 @author Pavel Kuzmin @license MIT @homepage https://s00d.github.io/on-codemerge/ @repository git+https://github.com/s00d/on-codemerge.git Copyright (c) 2026 Pavel Kuzmin - Built on 2026-07-02T13:39:17.947Z */
;var i=Object.defineProperty;var l=(r,o,t)=>o in r?i(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t;var e=(r,o,t)=>l(r,typeof o!="symbol"?o+"":o,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const a=require("../../utils/helpers.cjs");class s{constructor(){e(this,"name","toolbar");e(this,"toolbar",null);e(this,"editor",null)}initialize(o){this.editor=o,this.createToolbar()}createToolbar(){var t;this.toolbar=a.createContainer("editor-toolbar");const o=(t=this.editor)==null?void 0:t.getDOMContext().querySelector(".html-editor");o!=null&&o.parentNode&&this.toolbar&&o.parentNode.insertBefore(this.toolbar,o)}destroy(){this.toolbar&&(this.toolbar.remove(),this.toolbar=null)}getToolbar(){return this.toolbar}}exports.ToolbarPlugin=s;