@progress/kendo-react-editor 16.2.0-develop.8 → 16.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.mts CHANGED
@@ -7,13 +7,14 @@
7
7
  */
8
8
  import { Editor } from './Editor.js';
9
9
  import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps';
10
- import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml, parseContent } from '@progress/kendo-editor-common';
10
+ import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml as getHtmlCommon } from '@progress/kendo-editor-common';
11
11
  import { EditorTools } from './tools/index.js';
12
12
  import { EditorToolsSettings } from './config/toolsSettings.js';
13
13
  import { EditorUtils } from './utils/index.js';
14
14
  import { EditorDialogs } from './dialogs/index.js';
15
15
  import { editorPropsKey } from './utils/props-key.js';
16
- import { nodes, marks } from './config/schema';
16
+ import { nodes, marks, parseContent } from './config/schema.js';
17
+ declare const getHtml: typeof getHtmlCommon;
17
18
  export { type Shortcuts } from './config/shortcuts.js';
18
19
  export { type PasteCleanupSettings } from './config/pasteSettings';
19
20
  export { type EditorHandle } from './Editor.js';
package/index.d.ts CHANGED
@@ -7,13 +7,14 @@
7
7
  */
8
8
  import { Editor } from './Editor.js';
9
9
  import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps';
10
- import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml, parseContent } from '@progress/kendo-editor-common';
10
+ import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml as getHtmlCommon } from '@progress/kendo-editor-common';
11
11
  import { EditorTools } from './tools/index.js';
12
12
  import { EditorToolsSettings } from './config/toolsSettings.js';
13
13
  import { EditorUtils } from './utils/index.js';
14
14
  import { EditorDialogs } from './dialogs/index.js';
15
15
  import { editorPropsKey } from './utils/props-key.js';
16
- import { nodes, marks } from './config/schema';
16
+ import { nodes, marks, parseContent } from './config/schema.js';
17
+ declare const getHtml: typeof getHtmlCommon;
17
18
  export { type Shortcuts } from './config/shortcuts.js';
18
19
  export { type PasteCleanupSettings } from './config/pasteSettings';
19
20
  export { type EditorHandle } from './Editor.js';
package/index.js CHANGED
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Editor.js"),e=require("@progress/kendo-editor-common"),o=require("./tools/index.js"),l=require("./config/toolsSettings.js"),r=require("./utils/index.js"),n=require("./dialogs/index.js"),i=require("./utils/props-key.js"),a={Selection:e.Selection,SelectionRange:e.SelectionRange,TextSelection:e.TextSelection,NodeSelection:e.NodeSelection,AllSelection:e.AllSelection,EditorState:e.EditorState,Plugin:e.Plugin,PluginKey:e.PluginKey,Transaction:e.Transaction,Decoration:e.Decoration,DecorationSet:e.DecorationSet,EditorView:e.EditorView,Node:e.Node,ResolvedPos:e.ResolvedPos,NodeRange:e.NodeRange,Fragment:e.Fragment,Slice:e.Slice,ReplaceError:e.ReplaceError,Mark:e.Mark,Schema:e.Schema,NodeType:e.NodeType,MarkType:e.MarkType,ContentMatch:e.ContentMatch,DOMParser:e.DOMParser,DOMSerializer:e.DOMSerializer,Transform:e.Transform,Step:e.Step,StepResult:e.StepResult,joinPoint:e.joinPoint,canJoin:e.canJoin,canSplit:e.canSplit,insertPoint:e.insertPoint,dropPoint:e.dropPoint,liftTarget:e.liftTarget,findWrapping:e.findWrapping,StepMap:e.StepMap,MapResult:e.MapResult,Mapping:e.Mapping,AddMarkStep:e.AddMarkStep,RemoveMarkStep:e.RemoveMarkStep,ReplaceStep:e.ReplaceStep,ReplaceAroundStep:e.ReplaceAroundStep,replaceStep:e.replaceStep,deleteSelection:e.deleteSelection,joinBackward:e.joinBackward,selectNodeBackward:e.selectNodeBackward,joinForward:e.joinForward,selectNodeForward:e.selectNodeForward,joinUp:e.joinUp,joinDown:e.joinDown,lift:e.lift,newlineInCode:e.newlineInCode,exitCode:e.exitCode,createParagraphNear:e.createParagraphNear,liftEmptyBlock:e.liftEmptyBlock,splitBlock:e.splitBlock,splitBlockKeepMarks:e.splitBlockKeepMarks,selectParentNode:e.selectParentNode,selectAll:e.selectAll,wrapIn:e.wrapIn,setBlockType:e.setBlockType,toggleMark:e.toggleMark,autoJoin:e.autoJoin,chainCommands:e.chainCommands,pcBaseKeymap:e.pcBaseKeymap,macBaseKeymap:e.macBaseKeymap,baseKeymap:e.baseKeymap,history:e.history,undo:e.undo,redo:e.redo,undoDepth:e.undoDepth,redoDepth:e.redoDepth,InputRule:e.InputRule,inputRules:e.inputRules,undoInputRule:e.undoInputRule,emDash:e.emDash,ellipsis:e.ellipsis,openDoubleQuote:e.openDoubleQuote,closeDoubleQuote:e.closeDoubleQuote,openSingleQuote:e.openSingleQuote,closeSingleQuote:e.closeSingleQuote,smartQuotes:e.smartQuotes,wrappingInputRule:e.wrappingInputRule,textblockTypeInputRule:e.textblockTypeInputRule,keymap:e.keymap,keydownHandler:e.keydownHandler,orderedList:e.orderedList,bulletList:e.bulletList,listItem:e.listItem,addListNodes:e.addListNodes,wrapInList:e.wrapInList,splitListItem:e.splitListItem,liftListItem:e.liftListItem,sinkListItem:e.sinkListItem,dropCursor:e.dropCursor,gapCursor:e.gapCursor,tableEditing:e.tableEditing,fixTables:e.fixTables,fixTablesKey:e.fixTablesKey,cellAround:e.cellAround,isInTable:e.isInTable,selectionCell:e.selectionCell,moveCellForward:e.moveCellForward,inSameTable:e.inSameTable,findCell:e.findCell,colCount:e.colCount,nextCell:e.nextCell,removeColSpan:e.removeColSpan,addColSpan:e.addColSpan,columnIsHeader:e.columnIsHeader,tableNodes:e.tableNodes,tableNodeTypes:e.tableNodeTypes,CellSelection:e.CellSelection,TableMap:e.TableMap,tableEditingKey:e.tableEditingKey,columnResizing:e.columnResizing,columnResizingPluginKey:e.columnResizingPluginKey,updateColumnsOnResize:e.updateColumnsOnResize,selectedRect:e.selectedRect,addColumn:e.addColumn,addColumnBefore:e.addColumnBefore,addColumnAfter:e.addColumnAfter,deleteColumn:e.deleteColumn,rowIsHeader:e.rowIsHeader,addRow:e.addRow,addRowBefore:e.addRowBefore,addRowAfter:e.addRowAfter,deleteRow:e.deleteRow,mergeCells:e.mergeCells,splitCell:e.splitCell,splitCellWithType:e.splitCellWithType,setCellAttr:e.setCellAttr,toggleHeader:e.toggleHeader,toggleHeaderRow:e.toggleHeaderRow,toggleHeaderColumn:e.toggleHeaderColumn,toggleHeaderCell:e.toggleHeaderCell,goToNextCell:e.goToNextCell,deleteTable:e.deleteTable};exports.Editor=t.Editor;Object.defineProperty(exports,"getHtml",{enumerable:!0,get:()=>e.getHtml});Object.defineProperty(exports,"marks",{enumerable:!0,get:()=>e.marks});Object.defineProperty(exports,"nodes",{enumerable:!0,get:()=>e.nodes});Object.defineProperty(exports,"parseContent",{enumerable:!0,get:()=>e.parseContent});Object.defineProperty(exports,"EditorTools",{enumerable:!0,get:()=>o.EditorTools});Object.defineProperty(exports,"EditorToolsSettings",{enumerable:!0,get:()=>l.EditorToolsSettings});Object.defineProperty(exports,"EditorUtils",{enumerable:!0,get:()=>r.EditorUtils});Object.defineProperty(exports,"EditorDialogs",{enumerable:!0,get:()=>n.EditorDialogs});exports.editorPropsKey=i.editorPropsKey;exports.ProseMirror=a;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./Editor.js"),e=require("@progress/kendo-editor-common"),r=require("./tools/index.js"),n=require("./config/toolsSettings.js"),t=require("./utils/index.js"),i=require("./dialogs/index.js"),a=require("./utils/props-key.js"),o=require("./config/schema.js"),d=t.EditorUtils.getHtml,s={Selection:e.Selection,SelectionRange:e.SelectionRange,TextSelection:e.TextSelection,NodeSelection:e.NodeSelection,AllSelection:e.AllSelection,EditorState:e.EditorState,Plugin:e.Plugin,PluginKey:e.PluginKey,Transaction:e.Transaction,Decoration:e.Decoration,DecorationSet:e.DecorationSet,EditorView:e.EditorView,Node:e.Node,ResolvedPos:e.ResolvedPos,NodeRange:e.NodeRange,Fragment:e.Fragment,Slice:e.Slice,ReplaceError:e.ReplaceError,Mark:e.Mark,Schema:e.Schema,NodeType:e.NodeType,MarkType:e.MarkType,ContentMatch:e.ContentMatch,DOMParser:e.DOMParser,DOMSerializer:e.DOMSerializer,Transform:e.Transform,Step:e.Step,StepResult:e.StepResult,joinPoint:e.joinPoint,canJoin:e.canJoin,canSplit:e.canSplit,insertPoint:e.insertPoint,dropPoint:e.dropPoint,liftTarget:e.liftTarget,findWrapping:e.findWrapping,StepMap:e.StepMap,MapResult:e.MapResult,Mapping:e.Mapping,AddMarkStep:e.AddMarkStep,RemoveMarkStep:e.RemoveMarkStep,ReplaceStep:e.ReplaceStep,ReplaceAroundStep:e.ReplaceAroundStep,replaceStep:e.replaceStep,deleteSelection:e.deleteSelection,joinBackward:e.joinBackward,selectNodeBackward:e.selectNodeBackward,joinForward:e.joinForward,selectNodeForward:e.selectNodeForward,joinUp:e.joinUp,joinDown:e.joinDown,lift:e.lift,newlineInCode:e.newlineInCode,exitCode:e.exitCode,createParagraphNear:e.createParagraphNear,liftEmptyBlock:e.liftEmptyBlock,splitBlock:e.splitBlock,splitBlockKeepMarks:e.splitBlockKeepMarks,selectParentNode:e.selectParentNode,selectAll:e.selectAll,wrapIn:e.wrapIn,setBlockType:e.setBlockType,toggleMark:e.toggleMark,autoJoin:e.autoJoin,chainCommands:e.chainCommands,pcBaseKeymap:e.pcBaseKeymap,macBaseKeymap:e.macBaseKeymap,baseKeymap:e.baseKeymap,history:e.history,undo:e.undo,redo:e.redo,undoDepth:e.undoDepth,redoDepth:e.redoDepth,InputRule:e.InputRule,inputRules:e.inputRules,undoInputRule:e.undoInputRule,emDash:e.emDash,ellipsis:e.ellipsis,openDoubleQuote:e.openDoubleQuote,closeDoubleQuote:e.closeDoubleQuote,openSingleQuote:e.openSingleQuote,closeSingleQuote:e.closeSingleQuote,smartQuotes:e.smartQuotes,wrappingInputRule:e.wrappingInputRule,textblockTypeInputRule:e.textblockTypeInputRule,keymap:e.keymap,keydownHandler:e.keydownHandler,orderedList:e.orderedList,bulletList:e.bulletList,listItem:e.listItem,addListNodes:e.addListNodes,wrapInList:e.wrapInList,splitListItem:e.splitListItem,liftListItem:e.liftListItem,sinkListItem:e.sinkListItem,dropCursor:e.dropCursor,gapCursor:e.gapCursor,tableEditing:e.tableEditing,fixTables:e.fixTables,fixTablesKey:e.fixTablesKey,cellAround:e.cellAround,isInTable:e.isInTable,selectionCell:e.selectionCell,moveCellForward:e.moveCellForward,inSameTable:e.inSameTable,findCell:e.findCell,colCount:e.colCount,nextCell:e.nextCell,removeColSpan:e.removeColSpan,addColSpan:e.addColSpan,columnIsHeader:e.columnIsHeader,tableNodes:e.tableNodes,tableNodeTypes:e.tableNodeTypes,CellSelection:e.CellSelection,TableMap:e.TableMap,tableEditingKey:e.tableEditingKey,columnResizing:e.columnResizing,columnResizingPluginKey:e.columnResizingPluginKey,updateColumnsOnResize:e.updateColumnsOnResize,selectedRect:e.selectedRect,addColumn:e.addColumn,addColumnBefore:e.addColumnBefore,addColumnAfter:e.addColumnAfter,deleteColumn:e.deleteColumn,rowIsHeader:e.rowIsHeader,addRow:e.addRow,addRowBefore:e.addRowBefore,addRowAfter:e.addRowAfter,deleteRow:e.deleteRow,mergeCells:e.mergeCells,splitCell:e.splitCell,splitCellWithType:e.splitCellWithType,setCellAttr:e.setCellAttr,toggleHeader:e.toggleHeader,toggleHeaderRow:e.toggleHeaderRow,toggleHeaderColumn:e.toggleHeaderColumn,toggleHeaderCell:e.toggleHeaderCell,goToNextCell:e.goToNextCell,deleteTable:e.deleteTable};exports.Editor=l.Editor;Object.defineProperty(exports,"nodes",{enumerable:!0,get:()=>e.nodes});Object.defineProperty(exports,"EditorTools",{enumerable:!0,get:()=>r.EditorTools});Object.defineProperty(exports,"EditorToolsSettings",{enumerable:!0,get:()=>n.EditorToolsSettings});Object.defineProperty(exports,"EditorUtils",{enumerable:!0,get:()=>t.EditorUtils});Object.defineProperty(exports,"EditorDialogs",{enumerable:!0,get:()=>i.EditorDialogs});exports.editorPropsKey=a.editorPropsKey;exports.marks=o.marks;exports.parseContent=o.parseContent;exports.ProseMirror=s;exports.getHtml=d;
package/index.mjs CHANGED
@@ -6,15 +6,16 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { Editor as Ho } from "./Editor.mjs";
10
- import { deleteTable as e, goToNextCell as o, toggleHeaderCell as t, toggleHeaderColumn as l, toggleHeaderRow as r, toggleHeader as a, setCellAttr as n, splitCellWithType as i, splitCell as d, mergeCells as p, deleteRow as s, addRowAfter as c, addRowBefore as m, addRow as u, rowIsHeader as g, deleteColumn as C, addColumnAfter as S, addColumnBefore as R, addColumn as f, selectedRect as T, updateColumnsOnResize as w, columnResizingPluginKey as y, columnResizing as k, tableEditingKey as b, TableMap as x, CellSelection as I, tableNodeTypes as M, tableNodes as N, columnIsHeader as P, addColSpan as D, removeColSpan as E, nextCell as B, colCount as h, findCell as K, inSameTable as A, moveCellForward as H, selectionCell as L, isInTable as j, cellAround as Q, fixTablesKey as v, fixTables as z, tableEditing as F, gapCursor as O, dropCursor as J, sinkListItem as U, liftListItem as W, splitListItem as V, wrapInList as q, addListNodes as G, listItem as X, bulletList as Y, orderedList as Z, keydownHandler as _, keymap as $, textblockTypeInputRule as ee, wrappingInputRule as oe, smartQuotes as te, closeSingleQuote as le, openSingleQuote as re, closeDoubleQuote as ae, openDoubleQuote as ne, ellipsis as ie, emDash as de, undoInputRule as pe, inputRules as se, InputRule as ce, redoDepth as me, undoDepth as ue, redo as ge, undo as Ce, history as Se, baseKeymap as Re, macBaseKeymap as fe, pcBaseKeymap as Te, chainCommands as we, autoJoin as ye, toggleMark as ke, setBlockType as be, wrapIn as xe, selectAll as Ie, selectParentNode as Me, splitBlockKeepMarks as Ne, splitBlock as Pe, liftEmptyBlock as De, createParagraphNear as Ee, exitCode as Be, newlineInCode as he, lift as Ke, joinDown as Ae, joinUp as He, selectNodeForward as Le, joinForward as je, selectNodeBackward as Qe, joinBackward as ve, deleteSelection as ze, replaceStep as Fe, ReplaceAroundStep as Oe, ReplaceStep as Je, RemoveMarkStep as Ue, AddMarkStep as We, Mapping as Ve, MapResult as qe, StepMap as Ge, findWrapping as Xe, liftTarget as Ye, dropPoint as Ze, insertPoint as _e, canSplit as $e, canJoin as eo, joinPoint as oo, StepResult as to, Step as lo, Transform as ro, DOMSerializer as ao, DOMParser as no, ContentMatch as io, MarkType as po, NodeType as so, Schema as co, Mark as mo, ReplaceError as uo, Slice as go, Fragment as Co, NodeRange as So, ResolvedPos as Ro, Node as fo, EditorView as To, DecorationSet as wo, Decoration as yo, Transaction as ko, PluginKey as bo, Plugin as xo, EditorState as Io, AllSelection as Mo, NodeSelection as No, TextSelection as Po, SelectionRange as Do, Selection as Eo } from "@progress/kendo-editor-common";
11
- import { getHtml as jo, marks as Qo, nodes as vo, parseContent as zo } from "@progress/kendo-editor-common";
9
+ import { Editor as Qo } from "./Editor.mjs";
10
+ import { deleteTable as e, goToNextCell as o, toggleHeaderCell as t, toggleHeaderColumn as l, toggleHeaderRow as r, toggleHeader as a, setCellAttr as n, splitCellWithType as i, splitCell as d, mergeCells as p, deleteRow as s, addRowAfter as c, addRowBefore as m, addRow as u, rowIsHeader as g, deleteColumn as C, addColumnAfter as S, addColumnBefore as R, addColumn as f, selectedRect as T, updateColumnsOnResize as w, columnResizingPluginKey as y, columnResizing as k, tableEditingKey as b, TableMap as x, CellSelection as I, tableNodeTypes as M, tableNodes as N, columnIsHeader as P, addColSpan as D, removeColSpan as E, nextCell as B, colCount as h, findCell as H, inSameTable as K, moveCellForward as A, selectionCell as L, isInTable as j, cellAround as Q, fixTablesKey as v, fixTables as z, tableEditing as F, gapCursor as O, dropCursor as J, sinkListItem as U, liftListItem as W, splitListItem as V, wrapInList as q, addListNodes as G, listItem as X, bulletList as Y, orderedList as Z, keydownHandler as _, keymap as $, textblockTypeInputRule as ee, wrappingInputRule as oe, smartQuotes as te, closeSingleQuote as le, openSingleQuote as re, closeDoubleQuote as ae, openDoubleQuote as ne, ellipsis as ie, emDash as de, undoInputRule as pe, inputRules as se, InputRule as ce, redoDepth as me, undoDepth as ue, redo as ge, undo as Ce, history as Se, baseKeymap as Re, macBaseKeymap as fe, pcBaseKeymap as Te, chainCommands as we, autoJoin as ye, toggleMark as ke, setBlockType as be, wrapIn as xe, selectAll as Ie, selectParentNode as Me, splitBlockKeepMarks as Ne, splitBlock as Pe, liftEmptyBlock as De, createParagraphNear as Ee, exitCode as Be, newlineInCode as he, lift as He, joinDown as Ke, joinUp as Ae, selectNodeForward as Le, joinForward as je, selectNodeBackward as Qe, joinBackward as ve, deleteSelection as ze, replaceStep as Fe, ReplaceAroundStep as Oe, ReplaceStep as Je, RemoveMarkStep as Ue, AddMarkStep as We, Mapping as Ve, MapResult as qe, StepMap as Ge, findWrapping as Xe, liftTarget as Ye, dropPoint as Ze, insertPoint as _e, canSplit as $e, canJoin as eo, joinPoint as oo, StepResult as to, Step as lo, Transform as ro, DOMSerializer as ao, DOMParser as no, ContentMatch as io, MarkType as po, NodeType as so, Schema as co, Mark as mo, ReplaceError as uo, Slice as go, Fragment as Co, NodeRange as So, ResolvedPos as Ro, Node as fo, EditorView as To, DecorationSet as wo, Decoration as yo, Transaction as ko, PluginKey as bo, Plugin as xo, EditorState as Io, AllSelection as Mo, NodeSelection as No, TextSelection as Po, SelectionRange as Do, Selection as Eo } from "@progress/kendo-editor-common";
11
+ import { nodes as zo } from "@progress/kendo-editor-common";
12
12
  import { EditorTools as Oo } from "./tools/index.mjs";
13
13
  import { EditorToolsSettings as Uo } from "./config/toolsSettings.mjs";
14
- import { EditorUtils as Vo } from "./utils/index.mjs";
15
- import { EditorDialogs as Go } from "./dialogs/index.mjs";
16
- import { editorPropsKey as Yo } from "./utils/props-key.mjs";
17
- const ho = {
14
+ import { EditorUtils as Bo } from "./utils/index.mjs";
15
+ import { EditorDialogs as Vo } from "./dialogs/index.mjs";
16
+ import { editorPropsKey as Go } from "./utils/props-key.mjs";
17
+ import { marks as Yo, parseContent as Zo } from "./config/schema.mjs";
18
+ const Ko = Bo.getHtml, Ao = {
18
19
  // prosemirror-state
19
20
  Selection: Eo,
20
21
  SelectionRange: Do,
@@ -68,9 +69,9 @@ const ho = {
68
69
  selectNodeBackward: Qe,
69
70
  joinForward: je,
70
71
  selectNodeForward: Le,
71
- joinUp: He,
72
- joinDown: Ae,
73
- lift: Ke,
72
+ joinUp: Ae,
73
+ joinDown: Ke,
74
+ lift: He,
74
75
  newlineInCode: he,
75
76
  exitCode: Be,
76
77
  createParagraphNear: Ee,
@@ -129,9 +130,9 @@ const ho = {
129
130
  cellAround: Q,
130
131
  isInTable: j,
131
132
  selectionCell: L,
132
- moveCellForward: H,
133
- inSameTable: A,
134
- findCell: K,
133
+ moveCellForward: A,
134
+ inSameTable: K,
135
+ findCell: H,
135
136
  colCount: h,
136
137
  nextCell: B,
137
138
  removeColSpan: E,
@@ -167,15 +168,15 @@ const ho = {
167
168
  deleteTable: e
168
169
  };
169
170
  export {
170
- Ho as Editor,
171
- Go as EditorDialogs,
171
+ Qo as Editor,
172
+ Vo as EditorDialogs,
172
173
  Oo as EditorTools,
173
174
  Uo as EditorToolsSettings,
174
- Vo as EditorUtils,
175
- ho as ProseMirror,
176
- Yo as editorPropsKey,
177
- jo as getHtml,
178
- Qo as marks,
179
- vo as nodes,
180
- zo as parseContent
175
+ Bo as EditorUtils,
176
+ Ao as ProseMirror,
177
+ Go as editorPropsKey,
178
+ Ko as getHtml,
179
+ Yo as marks,
180
+ zo as nodes,
181
+ Zo as parseContent
181
182
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1789735553,version:"16.2.0-develop.8",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1791389020,version:"16.2.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1789735553,
11
- version: '16.2.0-develop.8',
10
+ publishDate: 1791389020,
11
+ version: '16.2.0',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-editor",
3
- "version": "16.2.0-develop.8",
3
+ "version": "16.2.0",
4
4
  "description": "React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,22 +27,22 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-drawing": "^1.25.5",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-react-buttons": "16.2.0-develop.8",
31
- "@progress/kendo-react-common": "16.2.0-develop.8",
32
- "@progress/kendo-react-dialogs": "16.2.0-develop.8",
33
- "@progress/kendo-react-dropdowns": "16.2.0-develop.8",
34
- "@progress/kendo-react-form": "16.2.0-develop.8",
35
- "@progress/kendo-react-inputs": "16.2.0-develop.8",
36
- "@progress/kendo-react-intl": "16.2.0-develop.8",
37
- "@progress/kendo-react-layout": "16.2.0-develop.8",
38
- "@progress/kendo-react-pdf": "16.2.0-develop.8",
39
- "@progress/kendo-react-popup": "16.2.0-develop.8",
30
+ "@progress/kendo-react-buttons": "16.2.0",
31
+ "@progress/kendo-react-common": "16.2.0",
32
+ "@progress/kendo-react-dialogs": "16.2.0",
33
+ "@progress/kendo-react-dropdowns": "16.2.0",
34
+ "@progress/kendo-react-form": "16.2.0",
35
+ "@progress/kendo-react-inputs": "16.2.0",
36
+ "@progress/kendo-react-intl": "16.2.0",
37
+ "@progress/kendo-react-layout": "16.2.0",
38
+ "@progress/kendo-react-pdf": "16.2.0",
39
+ "@progress/kendo-react-popup": "16.2.0",
40
40
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
41
41
  "react": "^18.0.0 || ^19.0.0",
42
42
  "react-dom": "^18.0.0 || ^19.0.0"
43
43
  },
44
44
  "dependencies": {
45
- "@progress/kendo-editor-common": "1.12.6",
45
+ "@progress/kendo-editor-common": "1.12.9",
46
46
  "prop-types": "^15.6.0"
47
47
  },
48
48
  "keywords": [
@@ -78,7 +78,7 @@
78
78
  "package": {
79
79
  "productName": "KendoReact",
80
80
  "productCode": "KENDOUIREACT",
81
- "publishDate": 1789735553,
81
+ "publishDate": 1791389020,
82
82
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
83
83
  }
84
84
  },
@@ -88,10 +88,5 @@
88
88
  "repository": {
89
89
  "type": "git",
90
90
  "url": "git+https://github.com/telerik/kendo-react.git"
91
- },
92
- "peerDependenciesMeta": {
93
- "@progress/kendo-svg-icons": {
94
- "optional": true
95
- }
96
91
  }
97
92
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-editor-common"),i=require("./index.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;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-editor-common"),d=require("../config/schema.js"),a=require("./index.js"),s=(t,e)=>{const c=e.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(e.doc?d.sanitizeLinkNode(e.doc):a.EditorUtils.createDocument(t.state.schema,e.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(c))},l=(t,e,c,o,r)=>{if(typeof e=="string")o&&e===r?s(t,{tr:o}):e!==c&&s(t,{html:e});else{const i=d.sanitizeLinkNode(e);o&&i.eq(o.doc)?s(t,{tr:o}):t.state.doc.eq(i)||s(t,{doc:i})}};exports.updateEditorValue=l;
@@ -5,14 +5,22 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { AllSelection as r } from "@progress/kendo-editor-common";
9
- import { EditorUtils as d } from "./index.mjs";
8
+ import { AllSelection as i } from "@progress/kendo-editor-common";
9
+ import { sanitizeLinkNode as r } from "../config/schema.mjs";
10
+ import { EditorUtils as p } from "./index.mjs";
10
11
  const s = (t, o) => {
11
- const c = o.tr || t.state.tr.setSelection(new r(t.state.doc)).replaceSelectionWith(o.doc || d.createDocument(t.state.schema, o.html || "")).setMeta("commandName", "setHTML");
12
+ const c = o.tr || t.state.tr.setSelection(new i(t.state.doc)).replaceSelectionWith(
13
+ o.doc ? r(o.doc) : p.createDocument(t.state.schema, o.html || "")
14
+ ).setMeta("commandName", "setHTML");
12
15
  t.updateState(t.state.apply(c));
13
- }, i = (t, o, c, e, m) => {
14
- typeof o == "string" ? e && o === m ? s(t, { tr: e }) : o !== c && s(t, { html: o }) : e && o.eq(e.doc) ? s(t, { tr: e }) : t.state.doc.eq(o) || s(t, { doc: o });
16
+ }, n = (t, o, c, e, d) => {
17
+ if (typeof o == "string")
18
+ e && o === d ? s(t, { tr: e }) : o !== c && s(t, { html: o });
19
+ else {
20
+ const m = r(o);
21
+ e && m.eq(e.doc) ? s(t, { tr: e }) : t.state.doc.eq(m) || s(t, { doc: m });
22
+ }
15
23
  };
16
24
  export {
17
- i as updateEditorValue
25
+ n as updateEditorValue
18
26
  };
package/utils/index.d.ts CHANGED
@@ -122,7 +122,7 @@ export declare namespace EditorUtils {
122
122
  */
123
123
  function getHtml(state: EditorState | {
124
124
  doc: Node;
125
- schema: Schema;
125
+ schema?: Schema;
126
126
  }): string;
127
127
  /**
128
128
  * @returns {string[]}—An array of matched styles that are found in the selection.
@@ -246,10 +246,15 @@ export declare namespace EditorUtils {
246
246
  */
247
247
  function removeAttribute(attr: Attr): void;
248
248
  /**
249
- * Removes the invalid HTML.
249
+ * Removes editor-specific invalid markup, such as artifacts left over when pasting from MS Word
250
+ * (for example `<o:p>`, `<w:sdtPr>`, or `<v:shapes>` tags).
250
251
  *
251
- * @param {string} html&mdash;The HTML which will be sanitized.
252
- * @returns {string}&mdash;The sanitized HTML.
252
+ * > This method is **not** an XSS sanitizer. It does not remove `script` tags, event-handler
253
+ * > attributes, or other active content, and must not be relied on as a security control. Sanitize
254
+ * > untrusted HTML with a dedicated library before rendering or persisting it.
255
+ *
256
+ * @param {string} html&mdash;The HTML which will be cleaned.
257
+ * @returns {string}&mdash;The cleaned HTML.
253
258
  *
254
259
  * @example
255
260
  * ```jsx-no-run
package/utils/index.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("../config/shortcuts.js"),a=require("@progress/kendo-editor-common"),V=require("./props-key.js");exports.EditorUtils=void 0;(t=>{function u(e,n,r){return!!a.alignBlocks(n,r)(e.state,e.dispatch)}t.alignBlocks=u;function s(e,n,r){return a.applyInlineStyle(n,r)(e.state,e.dispatch)}t.applyInlineStyle=s;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 d(e,n,r){a.insertNode(n,r)(e.state,e.dispatch)}t.insertNode=d;function H(e,n){return a.isAligned(e,n)}t.isAligned=H;function b(e,n,r){return a.isIndented(e,n,r)}t.isIndented=b;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 J=a.trimWhitespace(n);a.setHtml(J,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 Q.getShortcuts(e)}t.getShortcuts=j;function G(e){return a.placeholder(e)}t.placeholder=G,t.propsKey=V.editorPropsKey,t.imageResizeKey=a.imageResizeKey,t.marks={...a.marks},t.nodes={...a.nodes}})(exports.EditorUtils||(exports.EditorUtils={}));
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../config/shortcuts.js"),o=require("../config/schema.js"),a=require("@progress/kendo-editor-common"),X=require("./props-key.js");exports.EditorUtils=void 0;(t=>{function s(e,n,c){return!!a.alignBlocks(n,c)(e.state,e.dispatch)}t.alignBlocks=s;function u(e,n,c){return a.applyInlineStyle(n,c)(e.state,e.dispatch)}t.applyInlineStyle=u;function i(e,n,c){return a.applyLink(n,c)(e.state,e.dispatch)}t.applyLink=i;function m(e,n){return a.canIndentAsListItem(e,n)}t.canIndentList=m;function l(e,n){return a.canInsert(e,n)}t.canInsert=l;function g(e,n){return a.canOutdentAsListItem(e,{listsTypes:n,nodes:[]})}t.canOutdentList=g;function f(e){return a.convertMsLists(e)}t.convertMsLists=f;function p(e,n,c){return o.parseContent(a.trimWhitespace(n),o.sanitizeLinkSchema(e),c!==void 0?c:{preserveWhitespace:"full"})}t.createDocument=p;function h(e,n,c){return a.createTable(e,n,c)}t.createTable=h;function k(e,n,c){return a.formatBlockElements(n,c)(e.state,e.dispatch)}t.formatBlockElements=k;function S(e){return a.getBlockFormats(e)}t.getBlockFormats=S;function d(e){const n=e.doc.type.schema,c=o.sanitizeLinkSchema(n),r=c===n?e.doc:c.nodeFromJSON(e.doc.toJSON());return a.getHtml({doc:r,schema:c})}t.getHtml=d;function y(e,n){return a.getInlineStyles(e,n)}t.getInlineStyles=y;function I(e,n){return a.getMark(e,n)}t.getMark=I;function z(e,n){return a.hasMark(e,n)}t.hasMark=z;function L(e,n){return a.hasNode(e,n)}t.hasNode=L;function A(e,n,c,r){return!!a.indentBlocks(n,c,r)(e.state,e.dispatch)}t.indentBlocks=A;function B(e){return a.indentHtml(e)}t.indentHtml=B;function C(e,n,c){a.insertNode(n,c)(e.state,e.dispatch)}t.insertNode=C;function H(e,n){return a.isAligned(e,n)}t.isAligned=H;function M(e,n,c){return a.isIndented(e,n,c)}t.isIndented=M;function b(e){return a.removeComments(e)}t.removeComments=b;function R(e,n){return a.removeTag(e,n)}t.removeTag=R;function F(e,n){return a.pasteCleanup(e,n)}t.pasteCleanup=F;function N(e){a.sanitizeClassAttr(e)}t.sanitizeClassAttr=N;function T(e){a.sanitizeStyleAttr(e)}t.sanitizeStyleAttr=T;function v(e){a.removeAttribute(e)}t.removeAttribute=v;function K(e){return a.sanitize(e)}t.sanitize=K;function W(e,n){return a.replaceImageSourcesFromRtf(e,n)}t.replaceImageSourcesFromRtf=W;function q(e){return a.textHighlight(e)}t.textHighlight=q;function O(e){return a.imageResizing(e)}t.imageResizing=O;function x(){return a.tableResizing()}t.tableResizing=x;function D(e,n,c,r){const G=a.trimWhitespace(n),Q=o.parseContent(G,e.state.schema,r===void 0?{preserveWhitespace:"full"}:r);e.dispatch(e.state.tr.setSelection(new a.AllSelection(e.state.doc)).replaceSelectionWith(Q).setMeta("commandName",c===void 0?"setHTML":c))}t.setHtml=D;function J(e,n,c,r){return a.toggleInlineFormat(n,c,r)(e.state,e.dispatch)}t.toggleInlineFormat=J;function P(e,n,c){return a.toggleList(e.state,e.dispatch,e,n,c)}t.toggleList=P;function j(e){return V.getShortcuts(e)}t.getShortcuts=j;function $(e){return a.placeholder(e)}t.placeholder=$,t.propsKey=X.editorPropsKey,t.imageResizeKey=a.imageResizeKey,t.marks={...o.marks},t.nodes={...a.nodes}})(exports.EditorUtils||(exports.EditorUtils={}));
package/utils/index.mjs CHANGED
@@ -5,164 +5,168 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { getShortcuts as Q } from "../config/shortcuts.mjs";
9
- import { imageResizeKey as V, marks as X, nodes as Y, alignBlocks as Z, applyInlineStyle as _, applyLink as w, canIndentAsListItem as E, canInsert as U, canOutdentAsListItem as ee, convertMsLists as ne, parseContent as te, trimWhitespace as c, createTable as ae, formatBlockElements as re, getBlockFormats as ce, getHtml as ue, getInlineStyles as se, getMark as oe, hasMark as me, hasNode as ie, indentBlocks as ge, indentHtml as le, insertNode as fe, isAligned as pe, isIndented as $e, removeComments as he, removeTag as ke, pasteCleanup as Ie, sanitizeClassAttr as ye, sanitizeStyleAttr as ze, removeAttribute as Le, sanitize as Se, replaceImageSourcesFromRtf as Ae, textHighlight as Be, imageResizing as He, tableResizing as Re, setHtml as Ce, toggleInlineFormat as be, toggleList as Fe, placeholder as Me } from "@progress/kendo-editor-common";
10
- import { editorPropsKey as de } from "./props-key.mjs";
8
+ import { getShortcuts as Y } from "../config/shortcuts.mjs";
9
+ import { marks as Z, parseContent as r, sanitizeLinkSchema as o } from "../config/schema.mjs";
10
+ import { imageResizeKey as _, nodes as w, alignBlocks as E, applyInlineStyle as U, applyLink as ee, canIndentAsListItem as ne, canInsert as te, canOutdentAsListItem as ae, convertMsLists as ce, trimWhitespace as s, createTable as re, formatBlockElements as oe, getBlockFormats as se, getHtml as ue, getInlineStyles as me, getMark as ie, hasMark as ge, hasNode as le, indentBlocks as fe, indentHtml as pe, insertNode as he, isAligned as $e, isIndented as ke, removeComments as Ie, removeTag as Se, pasteCleanup as ye, sanitizeClassAttr as ze, sanitizeStyleAttr as Le, removeAttribute as de, sanitize as Ae, replaceImageSourcesFromRtf as Be, textHighlight as He, imageResizing as Me, tableResizing as Re, AllSelection as Ce, toggleInlineFormat as Fe, toggleList as be, placeholder as Ne } from "@progress/kendo-editor-common";
11
+ import { editorPropsKey as Te } from "./props-key.mjs";
11
12
  var u;
12
13
  ((t) => {
13
- function s(e, n, a) {
14
- return !!Z(n, a)(e.state, e.dispatch);
15
- }
16
- t.alignBlocks = s;
17
- function o(e, n, a) {
18
- return _(n, a)(e.state, e.dispatch);
19
- }
20
- t.applyInlineStyle = o;
21
14
  function m(e, n, a) {
22
- return w(n, a)(e.state, e.dispatch);
15
+ return !!E(n, a)(e.state, e.dispatch);
23
16
  }
24
- t.applyLink = m;
25
- function i(e, n) {
26
- return E(e, n);
17
+ t.alignBlocks = m;
18
+ function i(e, n, a) {
19
+ return U(n, a)(e.state, e.dispatch);
27
20
  }
28
- t.canIndentList = i;
29
- function g(e, n) {
30
- return U(e, n);
21
+ t.applyInlineStyle = i;
22
+ function g(e, n, a) {
23
+ return ee(n, a)(e.state, e.dispatch);
31
24
  }
32
- t.canInsert = g;
25
+ t.applyLink = g;
33
26
  function l(e, n) {
34
- return ee(e, { listsTypes: n, nodes: [] });
27
+ return ne(e, n);
28
+ }
29
+ t.canIndentList = l;
30
+ function f(e, n) {
31
+ return te(e, n);
32
+ }
33
+ t.canInsert = f;
34
+ function p(e, n) {
35
+ return ae(e, { listsTypes: n, nodes: [] });
35
36
  }
36
- t.canOutdentList = l;
37
- function f(e) {
38
- return ne(e);
37
+ t.canOutdentList = p;
38
+ function h(e) {
39
+ return ce(e);
39
40
  }
40
- t.convertMsLists = f;
41
- function p(e, n, a) {
42
- return te(
43
- c(n),
44
- e,
41
+ t.convertMsLists = h;
42
+ function $(e, n, a) {
43
+ return r(
44
+ s(n),
45
+ o(e),
45
46
  a !== void 0 ? a : { preserveWhitespace: "full" }
46
47
  );
47
48
  }
48
- t.createDocument = p;
49
- function $(e, n, a) {
50
- return ae(e, n, a);
49
+ t.createDocument = $;
50
+ function k(e, n, a) {
51
+ return re(e, n, a);
51
52
  }
52
- t.createTable = $;
53
- function h(e, n, a) {
54
- return re(n, a)(e.state, e.dispatch);
53
+ t.createTable = k;
54
+ function I(e, n, a) {
55
+ return oe(n, a)(e.state, e.dispatch);
55
56
  }
56
- t.formatBlockElements = h;
57
- function k(e) {
58
- return ce(e);
57
+ t.formatBlockElements = I;
58
+ function S(e) {
59
+ return se(e);
59
60
  }
60
- t.getBlockFormats = k;
61
- function I(e) {
62
- return ue(e);
61
+ t.getBlockFormats = S;
62
+ function y(e) {
63
+ const n = e.doc.type.schema, a = o(n), c = a === n ? e.doc : a.nodeFromJSON(e.doc.toJSON());
64
+ return ue({ doc: c, schema: a });
63
65
  }
64
- t.getHtml = I;
65
- function y(e, n) {
66
- return se(e, n);
67
- }
68
- t.getInlineStyles = y;
66
+ t.getHtml = y;
69
67
  function z(e, n) {
70
- return oe(e, n);
71
- }
72
- t.getMark = z;
73
- function L(e, n) {
74
68
  return me(e, n);
75
69
  }
76
- t.hasMark = L;
77
- function S(e, n) {
70
+ t.getInlineStyles = z;
71
+ function L(e, n) {
78
72
  return ie(e, n);
79
73
  }
80
- t.hasNode = S;
81
- function A(e, n, a, r) {
82
- return !!ge(n, a, r)(e.state, e.dispatch);
74
+ t.getMark = L;
75
+ function d(e, n) {
76
+ return ge(e, n);
83
77
  }
84
- t.indentBlocks = A;
85
- function B(e) {
86
- return le(e);
78
+ t.hasMark = d;
79
+ function A(e, n) {
80
+ return le(e, n);
87
81
  }
88
- t.indentHtml = B;
89
- function H(e, n, a) {
90
- fe(n, a)(e.state, e.dispatch);
82
+ t.hasNode = A;
83
+ function B(e, n, a, c) {
84
+ return !!fe(n, a, c)(e.state, e.dispatch);
91
85
  }
92
- t.insertNode = H;
86
+ t.indentBlocks = B;
87
+ function H(e) {
88
+ return pe(e);
89
+ }
90
+ t.indentHtml = H;
91
+ function M(e, n, a) {
92
+ he(n, a)(e.state, e.dispatch);
93
+ }
94
+ t.insertNode = M;
93
95
  function R(e, n) {
94
- return pe(e, n);
96
+ return $e(e, n);
95
97
  }
96
98
  t.isAligned = R;
97
99
  function C(e, n, a) {
98
- return $e(e, n, a);
100
+ return ke(e, n, a);
99
101
  }
100
102
  t.isIndented = C;
101
- function b(e) {
102
- return he(e);
103
- }
104
- t.removeComments = b;
105
- function F(e, n) {
106
- return ke(e, n);
103
+ function F(e) {
104
+ return Ie(e);
107
105
  }
108
- t.removeTag = F;
109
- function M(e, n) {
110
- return Ie(e, n);
106
+ t.removeComments = F;
107
+ function b(e, n) {
108
+ return Se(e, n);
111
109
  }
112
- t.pasteCleanup = M;
113
- function d(e) {
114
- ye(e);
110
+ t.removeTag = b;
111
+ function N(e, n) {
112
+ return ye(e, n);
115
113
  }
116
- t.sanitizeClassAttr = d;
117
- function N(e) {
118
- ze(e);
119
- }
120
- t.sanitizeStyleAttr = N;
114
+ t.pasteCleanup = N;
121
115
  function T(e) {
122
- Le(e);
116
+ ze(e);
123
117
  }
124
- t.removeAttribute = T;
118
+ t.sanitizeClassAttr = T;
125
119
  function v(e) {
126
- return Se(e);
120
+ Le(e);
127
121
  }
128
- t.sanitize = v;
129
- function x(e, n) {
130
- return Ae(e, n);
122
+ t.sanitizeStyleAttr = v;
123
+ function x(e) {
124
+ de(e);
131
125
  }
132
- t.replaceImageSourcesFromRtf = x;
126
+ t.removeAttribute = x;
133
127
  function K(e) {
134
- return Be(e);
128
+ return Ae(e);
135
129
  }
136
- t.textHighlight = K;
137
- function D(e) {
130
+ t.sanitize = K;
131
+ function W(e, n) {
132
+ return Be(e, n);
133
+ }
134
+ t.replaceImageSourcesFromRtf = W;
135
+ function O(e) {
138
136
  return He(e);
139
137
  }
138
+ t.textHighlight = O;
139
+ function D(e) {
140
+ return Me(e);
141
+ }
140
142
  t.imageResizing = D;
141
- function O() {
143
+ function J() {
142
144
  return Re();
143
145
  }
144
- t.tableResizing = O;
145
- function W(e, n, a, r) {
146
- const J = c(n);
147
- Ce(J, a, r)(e.state, e.dispatch);
148
- }
149
- t.setHtml = W;
150
- function P(e, n, a, r) {
151
- return be(n, a, r)(e.state, e.dispatch);
146
+ t.tableResizing = J;
147
+ function P(e, n, a, c) {
148
+ const V = s(n), X = r(V, e.state.schema, c === void 0 ? { preserveWhitespace: "full" } : c);
149
+ e.dispatch(
150
+ e.state.tr.setSelection(new Ce(e.state.doc)).replaceSelectionWith(X).setMeta("commandName", a === void 0 ? "setHTML" : a)
151
+ );
152
152
  }
153
- t.toggleInlineFormat = P;
154
- function j(e, n, a) {
155
- return Fe(e.state, e.dispatch, e, n, a);
153
+ t.setHtml = P;
154
+ function j(e, n, a, c) {
155
+ return Fe(n, a, c)(e.state, e.dispatch);
156
156
  }
157
- t.toggleList = j;
158
- function q(e) {
159
- return Q(e);
157
+ t.toggleInlineFormat = j;
158
+ function q(e, n, a) {
159
+ return be(e.state, e.dispatch, e, n, a);
160
160
  }
161
- t.getShortcuts = q;
161
+ t.toggleList = q;
162
162
  function G(e) {
163
- return Me(e);
163
+ return Y(e);
164
+ }
165
+ t.getShortcuts = G;
166
+ function Q(e) {
167
+ return Ne(e);
164
168
  }
165
- t.placeholder = G, t.propsKey = de, t.imageResizeKey = V, t.marks = { ...X }, t.nodes = { ...Y };
169
+ t.placeholder = Q, t.propsKey = Te, t.imageResizeKey = _, t.marks = { ...Z }, t.nodes = { ...w };
166
170
  })(u || (u = {}));
167
171
  export {
168
172
  u as EditorUtils