UNPKG

@progress/kendo-vue-editor

Version:
9 lines (8 loc) 3.17 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../config/shortcuts.js"),J=require("../config/schema.js"),r=require("@progress/kendo-editor-common"),Q=require("./props-key.js");exports.EditorUtils=void 0;(t=>{function s(e,n,a){return!!r.alignBlocks(n,a)(e.state,e.dispatch)}t.alignBlocks=s;function u(e,n,a){return r.applyInlineStyle(n,a)(e.state,e.dispatch)}t.applyInlineStyle=u;function o(e,n,a){return r.applyLink(n,a)(e.state,e.dispatch)}t.applyLink=o;function i(e,n){return r.canIndentAsListItem(e,n)}t.canIndentList=i;function m(e,n){return r.canInsert(e,n)}t.canInsert=m;function g(e,n){return r.canOutdentAsListItem(e,{listsTypes:n,nodes:[]})}t.canOutdentList=g;function l(e){return r.convertMsLists(e)}t.convertMsLists=l;function f(e,n,a){return r.parseContent(r.trimWhitespace(n),e,a!==void 0?a:{preserveWhitespace:"full"})}t.createDocument=f;function p(e,n,a){return r.createTable(e,n,a)}t.createTable=p;function h(e,n,a){return r.formatBlockElements(n,a)(e.state,e.dispatch)}t.formatBlockElements=h;function k(e){return r.getBlockFormats(e)}t.getBlockFormats=k;function I(e){return r.getHtml(e)}t.getHtml=I;function y(e,n){return r.getInlineStyles(e,n)}t.getInlineStyles=y;function S(e,n){return r.getMark(e,n)}t.getMark=S;function L(e,n){return r.hasMark(e,n)}t.hasMark=L;function z(e,n){return r.hasNode(e,n)}t.hasNode=z;function A(e,n,a,c){return!!r.indentBlocks(n,a,c)(e.state,e.dispatch)}t.indentBlocks=A;function B(e){return r.indentHtml(e)}t.indentHtml=B;function d(e,n,a){r.insertNode(n,a)(e.state,e.dispatch)}t.insertNode=d;function H(e,n){return r.isAligned(e,n)}t.isAligned=H;function C(e,n,a){return r.isIndented(e,n,a)}t.isIndented=C;function M(e){return r.removeComments(e)}t.removeComments=M;function F(e,n){return r.removeTag(e,n)}t.removeTag=F;function b(e,n){return r.pasteCleanup(e,n)}t.pasteCleanup=b;function R(e){r.sanitizeClassAttr(e)}t.sanitizeClassAttr=R;function T(e){r.sanitizeStyleAttr(e)}t.sanitizeStyleAttr=T;function v(e){r.removeAttribute(e)}t.removeAttribute=v;function N(e){return r.sanitize(e)}t.sanitize=N;function K(e,n){return r.replaceImageSourcesFromRtf(e,n)}t.replaceImageSourcesFromRtf=K;function q(e){return r.textHighlight(e)}t.textHighlight=q;function x(e){return r.imageResizing(e)}t.imageResizing=x;function O(e,n,a,c){const j=r.trimWhitespace(n);r.setHtml(j,a,c)(e.state,e.dispatch)}t.setHtml=O;function W(e,n,a,c){return r.toggleInlineFormat(n,a,c)(e.state,e.dispatch)}t.toggleInlineFormat=W;function D(e,n,a){return r.toggleList(e.state,e.dispatch,e,n,a)}t.toggleList=D;function P(e){return G.getShortcuts(e)}t.getShortcuts=P,t.propsKey=Q.editorPropsKey,t.imageResizeKey=r.imageResizeKey,t.marks={...r.marks},t.nodes={...J.nodes}})(exports.EditorUtils||(exports.EditorUtils={}));