UNPKG

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

2 lines (1 loc) 732 B
"use strict";var l=Object.defineProperty;var i=(e,o,r)=>o in e?l(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var t=(e,o,r)=>i(e,typeof o!="symbol"?o+"":o,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */;/* empty css */const a=require("../../utils/helpers.cjs");class s{constructor(){t(this,"name","toolbar");t(this,"toolbar",null)}initialize(o){this.createToolbar()}createToolbar(){this.toolbar=a.createContainer("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)}}exports.ToolbarPlugin=s;