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

20 lines (19 loc) 741 B
var a = Object.defineProperty; var i = (n, e, t) => e in n ? a(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; var s = (n, e, t) => i(n, typeof e != "symbol" ? e + "" : e, t); import { Table as c } from "../components/Table.mjs"; import { createLineBreak as l } from "../../../utils/helpers.mjs"; class g { constructor(e, t, o) { s(this, "options"); s(this, "range"); this.options = t, this.range = o.cloneRange(); } execute() { const e = new c(this.options), t = e.getElement(), o = l(), r = document.createDocumentFragment(); r.appendChild(t), r.appendChild(o), this.range.deleteContents(), this.range.insertNode(r), e.focusFirstCell(); } } export { g as InsertTableCommand };