UNPKG

@progress/kendo-react-editor

Version:

React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package

9 lines (8 loc) 3.19 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 J=require("../config/shortcuts.js"),a=require("@progress/kendo-editor-common"),Q=require("./props-key.js");exports.EditorUtils=void 0;(t=>{function s(e,n,r){return!!a.alignBlocks(n,r)(e.state,e.dispatch)}t.alignBlocks=s;function u(e,n,r){return a.applyInlineStyle(n,r)(e.state,e.dispatch)}t.applyInlineStyle=u;function o(e,n,r){return a.applyLink(n,r)(e.state,e.dispatch)}t.applyLink=o;function i(e,n){return a.canIndentAsListItem(e,n)}t.canIndentList=i;function m(e,n){return a.canInsert(e,n)}t.canInsert=m;function g(e,n){return a.canOutdentAsListItem(e,{listsTypes:n,nodes:[]})}t.canOutdentList=g;function l(e){return a.convertMsLists(e)}t.convertMsLists=l;function f(e,n,r){return a.parseContent(a.trimWhitespace(n),e,r!==void 0?r:{preserveWhitespace:"full"})}t.createDocument=f;function p(e,n,r){return a.createTable(e,n,r)}t.createTable=p;function h(e,n,r){return a.formatBlockElements(n,r)(e.state,e.dispatch)}t.formatBlockElements=h;function k(e){return a.getBlockFormats(e)}t.getBlockFormats=k;function I(e){return a.getHtml(e)}t.getHtml=I;function y(e,n){return a.getInlineStyles(e,n)}t.getInlineStyles=y;function z(e,n){return a.getMark(e,n)}t.getMark=z;function S(e,n){return a.hasMark(e,n)}t.hasMark=S;function L(e,n){return a.hasNode(e,n)}t.hasNode=L;function A(e,n,r,c){return!!a.indentBlocks(n,r,c)(e.state,e.dispatch)}t.indentBlocks=A;function B(e){return a.indentHtml(e)}t.indentHtml=B;function H(e,n,r){a.insertNode(n,r)(e.state,e.dispatch)}t.insertNode=H;function b(e,n){return a.isAligned(e,n)}t.isAligned=b;function d(e,n,r){return a.isIndented(e,n,r)}t.isIndented=d;function C(e){return a.removeComments(e)}t.removeComments=C;function R(e,n){return a.removeTag(e,n)}t.removeTag=R;function M(e,n){return a.pasteCleanup(e,n)}t.pasteCleanup=M;function F(e){a.sanitizeClassAttr(e)}t.sanitizeClassAttr=F;function T(e){a.sanitizeStyleAttr(e)}t.sanitizeStyleAttr=T;function v(e){a.removeAttribute(e)}t.removeAttribute=v;function N(e){return a.sanitize(e)}t.sanitize=N;function K(e,n){return a.replaceImageSourcesFromRtf(e,n)}t.replaceImageSourcesFromRtf=K;function q(e){return a.textHighlight(e)}t.textHighlight=q;function x(e){return a.imageResizing(e)}t.imageResizing=x;function O(){return a.tableResizing()}t.tableResizing=O;function W(e,n,r,c){const G=a.trimWhitespace(n);a.setHtml(G,r,c)(e.state,e.dispatch)}t.setHtml=W;function D(e,n,r,c){return a.toggleInlineFormat(n,r,c)(e.state,e.dispatch)}t.toggleInlineFormat=D;function P(e,n,r){return a.toggleList(e.state,e.dispatch,e,n,r)}t.toggleList=P;function j(e){return J.getShortcuts(e)}t.getShortcuts=j,t.propsKey=Q.editorPropsKey,t.imageResizeKey=a.imageResizeKey,t.marks={...a.marks},t.nodes={...a.nodes}})(exports.EditorUtils||(exports.EditorUtils={}));