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) 640 B
var d = Object.defineProperty; var n = (o, t, e) => t in o ? d(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; var a = (o, t, e) => n(o, typeof t != "symbol" ? t + "" : t, e); import { createVideo as s } from "../../../utils/helpers.mjs"; class i { constructor(t, e) { a(this, "dataUrl"); this.dataUrl = e; } execute() { const t = s("max-w-full h-auto rounded-lg"); t.src = this.dataUrl, t.controls = !0; const e = window.getSelection(), r = e == null ? void 0 : e.getRangeAt(0); r && (r.deleteContents(), r.insertNode(t), r.collapse(!1)); } } export { i as VideoCommand };