@progress/kendo-react-editor
Version:
React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package
166 lines (165 loc) • 4.18 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { getShortcuts as J } from "../config/shortcuts.mjs";
import { imageResizeKey as Q, marks as V, nodes as X, alignBlocks as Y, applyInlineStyle as Z, applyLink as _, canIndentAsListItem as w, canInsert as E, canOutdentAsListItem as U, convertMsLists as ee, parseContent as ne, trimWhitespace as c, createTable as te, formatBlockElements as ae, getBlockFormats as re, getHtml as ce, getInlineStyles as ue, getMark as se, hasMark as oe, hasNode as me, indentBlocks as ie, indentHtml as ge, insertNode as fe, isAligned as le, isIndented as pe, removeComments as $e, removeTag as he, pasteCleanup as ke, sanitizeClassAttr as Ie, sanitizeStyleAttr as ye, removeAttribute as ze, sanitize as Le, replaceImageSourcesFromRtf as Se, textHighlight as Ae, imageResizing as Be, tableResizing as He, setHtml as Re, toggleInlineFormat as Ce, toggleList as be } from "@progress/kendo-editor-common";
import { editorPropsKey as Fe } from "./props-key.mjs";
var u;
((t) => {
function s(e, n, a) {
return !!Y(n, a)(e.state, e.dispatch);
}
t.alignBlocks = s;
function o(e, n, a) {
return Z(n, a)(e.state, e.dispatch);
}
t.applyInlineStyle = o;
function m(e, n, a) {
return _(n, a)(e.state, e.dispatch);
}
t.applyLink = m;
function i(e, n) {
return w(e, n);
}
t.canIndentList = i;
function g(e, n) {
return E(e, n);
}
t.canInsert = g;
function f(e, n) {
return U(e, { listsTypes: n, nodes: [] });
}
t.canOutdentList = f;
function l(e) {
return ee(e);
}
t.convertMsLists = l;
function p(e, n, a) {
return ne(
c(n),
e,
a !== void 0 ? a : { preserveWhitespace: "full" }
);
}
t.createDocument = p;
function $(e, n, a) {
return te(e, n, a);
}
t.createTable = $;
function h(e, n, a) {
return ae(n, a)(e.state, e.dispatch);
}
t.formatBlockElements = h;
function k(e) {
return re(e);
}
t.getBlockFormats = k;
function I(e) {
return ce(e);
}
t.getHtml = I;
function y(e, n) {
return ue(e, n);
}
t.getInlineStyles = y;
function z(e, n) {
return se(e, n);
}
t.getMark = z;
function L(e, n) {
return oe(e, n);
}
t.hasMark = L;
function S(e, n) {
return me(e, n);
}
t.hasNode = S;
function A(e, n, a, r) {
return !!ie(n, a, r)(e.state, e.dispatch);
}
t.indentBlocks = A;
function B(e) {
return ge(e);
}
t.indentHtml = B;
function H(e, n, a) {
fe(n, a)(e.state, e.dispatch);
}
t.insertNode = H;
function R(e, n) {
return le(e, n);
}
t.isAligned = R;
function C(e, n, a) {
return pe(e, n, a);
}
t.isIndented = C;
function b(e) {
return $e(e);
}
t.removeComments = b;
function F(e, n) {
return he(e, n);
}
t.removeTag = F;
function M(e, n) {
return ke(e, n);
}
t.pasteCleanup = M;
function N(e) {
Ie(e);
}
t.sanitizeClassAttr = N;
function T(e) {
ye(e);
}
t.sanitizeStyleAttr = T;
function v(e) {
ze(e);
}
t.removeAttribute = v;
function d(e) {
return Le(e);
}
t.sanitize = d;
function x(e, n) {
return Se(e, n);
}
t.replaceImageSourcesFromRtf = x;
function K(e) {
return Ae(e);
}
t.textHighlight = K;
function D(e) {
return Be(e);
}
t.imageResizing = D;
function O() {
return He();
}
t.tableResizing = O;
function W(e, n, a, r) {
const G = c(n);
Re(G, a, r)(e.state, e.dispatch);
}
t.setHtml = W;
function P(e, n, a, r) {
return Ce(n, a, r)(e.state, e.dispatch);
}
t.toggleInlineFormat = P;
function j(e, n, a) {
return be(e.state, e.dispatch, e, n, a);
}
t.toggleList = j;
function q(e) {
return J(e);
}
t.getShortcuts = q, t.propsKey = Fe, t.imageResizeKey = Q, t.marks = { ...V }, t.nodes = { ...X };
})(u || (u = {}));
export {
u as EditorUtils
};