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

25 lines (24 loc) 891 B
/*! 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 l = Object.defineProperty; var r = (e, t, o) => t in e ? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o; var n = (e, t, o) => r(e, typeof t != "symbol" ? t + "" : t, o); class i { constructor(t, o) { n(this, "cell"); n(this, "previousContent", ""); this.cell = o; } execute() { this.previousContent = this.cell.textContent || "", navigator.clipboard.readText().then((t) => { this.cell.textContent = t; }).catch((t) => { console.error("Failed to read clipboard:", t); }); } undo() { this.cell.textContent = this.previousContent; } } export { i as PasteCellCommand };