UNPKG

@progress/kendo-vue-editor

Version:
163 lines (162 loc) 4.14 kB
/** * @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 G } from "../config/shortcuts.mjs"; import { nodes as J } from "../config/schema.mjs"; import { imageResizeKey as Q, marks as V, alignBlocks as X, applyInlineStyle as Y, applyLink as Z, canIndentAsListItem as _, canInsert as w, canOutdentAsListItem as E, convertMsLists as U, parseContent as ee, trimWhitespace as c, createTable as ne, formatBlockElements as te, getBlockFormats as ae, getHtml as re, getInlineStyles as ce, getMark as ue, hasMark as se, hasNode as oe, indentBlocks as me, indentHtml as ie, insertNode as ge, isAligned as fe, isIndented as le, removeComments as pe, removeTag as $e, pasteCleanup as he, sanitizeClassAttr as ke, sanitizeStyleAttr as Ie, removeAttribute as ye, sanitize as Le, replaceImageSourcesFromRtf as Se, textHighlight as ze, imageResizing as Ae, setHtml as Be, toggleInlineFormat as He, toggleList as Ce } from "@progress/kendo-editor-common"; import { editorPropsKey as Fe } from "./props-key.mjs"; var u; ((t) => { function s(e, n, a) { return !!X(n, a)(e.state, e.dispatch); } t.alignBlocks = s; function o(e, n, a) { return Y(n, a)(e.state, e.dispatch); } t.applyInlineStyle = o; function m(e, n, a) { return Z(n, a)(e.state, e.dispatch); } t.applyLink = m; function i(e, n) { return _(e, n); } t.canIndentList = i; function g(e, n) { return w(e, n); } t.canInsert = g; function f(e, n) { return E(e, { listsTypes: n, nodes: [] }); } t.canOutdentList = f; function l(e) { return U(e); } t.convertMsLists = l; function p(e, n, a) { return ee( c(n), e, a !== void 0 ? a : { preserveWhitespace: "full" } ); } t.createDocument = p; function $(e, n, a) { return ne(e, n, a); } t.createTable = $; function h(e, n, a) { return te(n, a)(e.state, e.dispatch); } t.formatBlockElements = h; function k(e) { return ae(e); } t.getBlockFormats = k; function I(e) { return re(e); } t.getHtml = I; function y(e, n) { return ce(e, n); } t.getInlineStyles = y; function L(e, n) { return ue(e, n); } t.getMark = L; function S(e, n) { return se(e, n); } t.hasMark = S; function z(e, n) { return oe(e, n); } t.hasNode = z; function A(e, n, a, r) { return !!me(n, a, r)(e.state, e.dispatch); } t.indentBlocks = A; function B(e) { return ie(e); } t.indentHtml = B; function H(e, n, a) { ge(n, a)(e.state, e.dispatch); } t.insertNode = H; function C(e, n) { return fe(e, n); } t.isAligned = C; function F(e, n, a) { return le(e, n, a); } t.isIndented = F; function M(e) { return pe(e); } t.removeComments = M; function R(e, n) { return $e(e, n); } t.removeTag = R; function b(e, n) { return he(e, n); } t.pasteCleanup = b; function N(e) { ke(e); } t.sanitizeClassAttr = N; function T(e) { Ie(e); } t.sanitizeStyleAttr = T; function d(e) { ye(e); } t.removeAttribute = d; function v(e) { return Le(e); } t.sanitize = v; function x(e, n) { return Se(e, n); } t.replaceImageSourcesFromRtf = x; function K(e) { return ze(e); } t.textHighlight = K; function D(e) { return Ae(e); } t.imageResizing = D; function O(e, n, a, r) { const q = c(n); Be(q, a, r)(e.state, e.dispatch); } t.setHtml = O; function W(e, n, a, r) { return He(n, a, r)(e.state, e.dispatch); } t.toggleInlineFormat = W; function P(e, n, a) { return Ce(e.state, e.dispatch, e, n, a); } t.toggleList = P; function j(e) { return G(e); } t.getShortcuts = j, t.propsKey = Fe, t.imageResizeKey = Q, t.marks = { ...V }, t.nodes = { ...J }; })(u || (u = {})); export { u as EditorUtils };