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) • 663 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../components/TableCell.cjs");class w{static addRow(e,l,t=!1){const n=l.parentElement.rowIndex,o=e.insertRow(t?n:n+1),r=l.parentElement.cells.length;for(let s=0;s<r;s++){const c=o.insertCell();new a.TableCell(c)}return o}static addColumn(e,l,t=!1){const n=l.cellIndex,o=[];for(const r of e.rows){const s=r.insertCell(t?n:n+1);new a.TableCell(s),o.push(s)}return o}static deleteRow(e,l){e.rows.length>1&&l.remove()}static deleteColumn(e,l){if(e.rows[0].cells.length>1)for(const t of e.rows)t.deleteCell(l)}static deleteTable(e){e.remove()}}exports.TableOperations=w;