@progress/kendo-vue-editor
Version:
9 lines (8 loc) • 925 B
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-editor-common"),i=require("./main.js"),s=(t,e)=>{const c=e.tr||t.state.tr.setSelection(new r.AllSelection(t.state.doc)).replaceSelectionWith(e.doc||i.EditorUtils.createDocument(t.state.schema,e.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(c))},a=(t,e,c,o,d)=>{typeof e=="string"?o&&e===d?s(t,{tr:o}):e!==c&&s(t,{html:e}):o&&e.eq(o.doc)?s(t,{tr:o}):t.state.doc.eq(e)||s(t,{doc:e})};exports.updateEditorValue=a;