@progress/kendo-react-editor 7.2.4-develop.2 → 7.2.4-develop.4

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.
Files changed (150) hide show
  1. package/Editor.js +8 -0
  2. package/Editor.mjs +327 -0
  3. package/config/defaultStyles.js +229 -0
  4. package/config/defaultStyles.mjs +235 -0
  5. package/config/shortcuts.js +8 -0
  6. package/config/shortcuts.mjs +34 -0
  7. package/config/toolsSettings.js +8 -0
  8. package/config/toolsSettings.mjs +549 -0
  9. package/dialogs/FindReplace.js +8 -0
  10. package/dialogs/FindReplace.mjs +214 -0
  11. package/dialogs/index.js +8 -0
  12. package/dialogs/index.mjs +30 -0
  13. package/dialogs/insertImage.js +8 -0
  14. package/dialogs/insertImage.mjs +117 -0
  15. package/dialogs/insertLink.js +8 -0
  16. package/dialogs/insertLink.mjs +96 -0
  17. package/dialogs/viewHtml.js +8 -0
  18. package/dialogs/viewHtml.mjs +70 -0
  19. package/dist/cdn/js/kendo-react-editor.js +8 -226
  20. package/index.d.mts +2943 -5
  21. package/index.d.ts +2941 -178
  22. package/index.js +8 -226
  23. package/index.mjs +165 -4118
  24. package/messages/index.js +8 -0
  25. package/messages/index.mjs +345 -0
  26. package/package-metadata.js +8 -0
  27. package/package-metadata.mjs +19 -0
  28. package/package.json +11 -11
  29. package/tools/align.js +8 -0
  30. package/tools/align.mjs +38 -0
  31. package/tools/applyColor.js +8 -0
  32. package/tools/applyColor.mjs +34 -0
  33. package/tools/cleanFormatting.js +8 -0
  34. package/tools/cleanFormatting.mjs +41 -0
  35. package/tools/findReplace.js +8 -0
  36. package/tools/findReplace.mjs +53 -0
  37. package/tools/fontStyle.js +8 -0
  38. package/tools/fontStyle.mjs +61 -0
  39. package/tools/formatBlock.js +8 -0
  40. package/tools/formatBlock.mjs +60 -0
  41. package/tools/history.js +8 -0
  42. package/tools/history.mjs +17 -0
  43. package/tools/indent.js +8 -0
  44. package/tools/indent.mjs +43 -0
  45. package/tools/index.js +8 -0
  46. package/tools/index.mjs +278 -0
  47. package/tools/inlineFormat.js +8 -0
  48. package/tools/inlineFormat.mjs +43 -0
  49. package/tools/insertImage.js +8 -0
  50. package/tools/insertImage.mjs +58 -0
  51. package/tools/insertLink.js +8 -0
  52. package/tools/insertLink.mjs +61 -0
  53. package/tools/insertTable/popup.js +8 -0
  54. package/tools/insertTable/popup.mjs +94 -0
  55. package/tools/insertTable/popupGrid.js +8 -0
  56. package/tools/insertTable/popupGrid.mjs +58 -0
  57. package/tools/insertTable/tool.js +8 -0
  58. package/tools/insertTable/tool.mjs +73 -0
  59. package/tools/lists-styled.js +8 -0
  60. package/tools/lists-styled.mjs +61 -0
  61. package/tools/lists.js +8 -0
  62. package/tools/lists.mjs +47 -0
  63. package/tools/outdent.js +8 -0
  64. package/tools/outdent.mjs +43 -0
  65. package/tools/pdf.js +8 -0
  66. package/tools/pdf.mjs +36 -0
  67. package/tools/print.js +8 -0
  68. package/tools/print.mjs +38 -0
  69. package/tools/proseMirrorTool.js +8 -0
  70. package/tools/proseMirrorTool.mjs +37 -0
  71. package/tools/selectAll.js +8 -0
  72. package/tools/selectAll.mjs +36 -0
  73. package/tools/table-wizard/cellPropsUtils.js +8 -0
  74. package/tools/table-wizard/cellPropsUtils.mjs +124 -0
  75. package/tools/table-wizard/tableCellProperties.js +8 -0
  76. package/tools/table-wizard/tableCellProperties.mjs +238 -0
  77. package/tools/table-wizard/tableProperties.js +8 -0
  78. package/tools/table-wizard/tableProperties.mjs +292 -0
  79. package/tools/table-wizard/tablePropsUtils.js +8 -0
  80. package/tools/table-wizard/tablePropsUtils.mjs +288 -0
  81. package/tools/table-wizard/utils.js +8 -0
  82. package/tools/table-wizard/utils.mjs +91 -0
  83. package/tools/tableEdit.js +8 -0
  84. package/tools/tableEdit.mjs +36 -0
  85. package/tools/unlink.js +8 -0
  86. package/tools/unlink.mjs +41 -0
  87. package/tools/utils.js +8 -0
  88. package/tools/utils.mjs +51 -0
  89. package/tools/viewHtml.js +8 -0
  90. package/tools/viewHtml.mjs +57 -0
  91. package/utils/browser-detection.js +8 -0
  92. package/utils/browser-detection.mjs +12 -0
  93. package/utils/controlled-value.js +8 -0
  94. package/utils/controlled-value.mjs +19 -0
  95. package/utils/index.js +8 -0
  96. package/utils/index.mjs +162 -0
  97. package/utils/props-key.js +8 -0
  98. package/utils/props-key.mjs +13 -0
  99. package/Editor.d.ts +0 -122
  100. package/EditorProps.d.ts +0 -200
  101. package/config/defaultStyles.d.ts +0 -16
  102. package/config/pasteSettings.d.ts +0 -10
  103. package/config/schema.d.ts +0 -5
  104. package/config/shortcuts.d.ts +0 -28
  105. package/config/toolsSettings.d.ts +0 -493
  106. package/dialogs/EditorDialogProps.d.ts +0 -30
  107. package/dialogs/FindReplace.d.ts +0 -75
  108. package/dialogs/index.d.ts +0 -53
  109. package/dialogs/insertImage.d.ts +0 -32
  110. package/dialogs/insertLink.d.ts +0 -30
  111. package/dialogs/viewHtml.d.ts +0 -29
  112. package/messages/index.d.ts +0 -338
  113. package/package-metadata.d.ts +0 -9
  114. package/tools/ToolProps.d.ts +0 -41
  115. package/tools/align.d.ts +0 -11
  116. package/tools/applyColor.d.ts +0 -16
  117. package/tools/cleanFormatting.d.ts +0 -20
  118. package/tools/findReplace.d.ts +0 -33
  119. package/tools/fontStyle.d.ts +0 -32
  120. package/tools/formatBlock.d.ts +0 -22
  121. package/tools/history.d.ts +0 -30
  122. package/tools/indent.d.ts +0 -21
  123. package/tools/index.d.ts +0 -718
  124. package/tools/inlineFormat.d.ts +0 -51
  125. package/tools/insertImage.d.ts +0 -17
  126. package/tools/insertLink.d.ts +0 -28
  127. package/tools/insertTable/index.d.ts +0 -7
  128. package/tools/insertTable/popup.d.ts +0 -97
  129. package/tools/insertTable/popupGrid.d.ts +0 -35
  130. package/tools/insertTable/tool.d.ts +0 -28
  131. package/tools/lists-styled.d.ts +0 -8
  132. package/tools/lists.d.ts +0 -31
  133. package/tools/outdent.d.ts +0 -21
  134. package/tools/pdf.d.ts +0 -29
  135. package/tools/print.d.ts +0 -20
  136. package/tools/proseMirrorTool.d.ts +0 -16
  137. package/tools/selectAll.d.ts +0 -20
  138. package/tools/table-wizard/cellPropsUtils.d.ts +0 -40
  139. package/tools/table-wizard/tableCellProperties.d.ts +0 -24
  140. package/tools/table-wizard/tableProperties.d.ts +0 -15
  141. package/tools/table-wizard/tablePropsUtils.d.ts +0 -56
  142. package/tools/table-wizard/utils.d.ts +0 -43
  143. package/tools/tableEdit.d.ts +0 -102
  144. package/tools/unlink.d.ts +0 -21
  145. package/tools/utils.d.ts +0 -54
  146. package/tools/viewHtml.d.ts +0 -28
  147. package/utils/browser-detection.d.ts +0 -8
  148. package/utils/controlled-value.d.ts +0 -9
  149. package/utils/index.d.ts +0 -367
  150. package/utils/props-key.d.ts +0 -9
package/index.d.ts CHANGED
@@ -1,180 +1,2943 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Editor } from './Editor';
6
- import { type EditorProps, type EditorMountEvent, type EditorPasteEvent, type EditorChangeEvent, type EditorExecuteEvent, type EditorFocusEvent, type EditorBlurEvent } from './EditorProps';
7
- import { EditorTools } from './tools';
8
- import { EditorToolsSettings } from './config/toolsSettings';
9
- import { EditorUtils } from './utils';
10
- import { EditorDialogs } from './dialogs';
11
- import { editorPropsKey } from './utils/props-key';
12
- import { nodes, marks } from './config/schema';
13
- import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, type MarkSpec, Schema, NodeType, type 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';
14
- export { type Shortcuts } from './config/shortcuts';
15
- export { type PasteCleanupSettings } from './config/pasteSettings';
16
1
  /**
17
- * An object containing the content of ProseMirror packages used at the Editor component.
18
- *
19
- * "prosemirror-state",
20
- * "prosemirror-view",
21
- * "prosemirror-model",
22
- * "prosemirror-transform",
23
- * "prosemirror-commands",
24
- * "prosemirror-keymap",
25
- * "prosemirror-tables",
26
- * "prosemirror-schema-list",
27
- * "prosemirror-history",
28
- * "prosemirror-inputrules",
29
- * "prosemirror-dropcursor",
30
- * "prosemirror-gapcursor"
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
31
7
  */
32
- export declare const ProseMirror: {
33
- Selection: typeof Selection;
34
- SelectionRange: typeof SelectionRange;
35
- TextSelection: typeof TextSelection;
36
- NodeSelection: typeof NodeSelection;
37
- AllSelection: typeof AllSelection;
38
- EditorState: typeof EditorState;
39
- Plugin: typeof Plugin;
40
- PluginKey: typeof PluginKey;
41
- Transaction: typeof Transaction;
42
- Decoration: typeof Decoration;
43
- DecorationSet: typeof DecorationSet;
44
- EditorView: typeof EditorView;
45
- Node: typeof Node;
46
- ResolvedPos: typeof ResolvedPos;
47
- NodeRange: typeof NodeRange;
48
- Fragment: typeof Fragment;
49
- Slice: typeof Slice;
50
- ReplaceError: typeof ReplaceError;
51
- Mark: typeof Mark;
52
- Schema: typeof Schema;
53
- NodeType: typeof NodeType;
54
- MarkType: typeof MarkType;
55
- ContentMatch: typeof ContentMatch;
56
- DOMParser: typeof DOMParser;
57
- DOMSerializer: typeof DOMSerializer;
58
- Transform: typeof Transform;
59
- Step: typeof Step;
60
- StepResult: typeof StepResult;
61
- joinPoint: typeof joinPoint;
62
- canJoin: typeof canJoin;
63
- canSplit: typeof canSplit;
64
- insertPoint: typeof insertPoint;
65
- dropPoint: typeof dropPoint;
66
- liftTarget: typeof liftTarget;
67
- findWrapping: typeof findWrapping;
68
- StepMap: typeof StepMap;
69
- MapResult: typeof MapResult;
70
- Mapping: typeof Mapping;
71
- AddMarkStep: typeof AddMarkStep;
72
- RemoveMarkStep: typeof RemoveMarkStep;
73
- ReplaceStep: typeof ReplaceStep;
74
- ReplaceAroundStep: typeof ReplaceAroundStep;
75
- replaceStep: typeof replaceStep;
76
- deleteSelection: import("prosemirror-state").Command;
77
- joinBackward: import("prosemirror-state").Command;
78
- selectNodeBackward: import("prosemirror-state").Command;
79
- joinForward: import("prosemirror-state").Command;
80
- selectNodeForward: import("prosemirror-state").Command;
81
- joinUp: import("prosemirror-state").Command;
82
- joinDown: import("prosemirror-state").Command;
83
- lift: import("prosemirror-state").Command;
84
- newlineInCode: import("prosemirror-state").Command;
85
- exitCode: import("prosemirror-state").Command;
86
- createParagraphNear: import("prosemirror-state").Command;
87
- liftEmptyBlock: import("prosemirror-state").Command;
88
- splitBlock: import("prosemirror-state").Command;
89
- splitBlockKeepMarks: import("prosemirror-state").Command;
90
- selectParentNode: import("prosemirror-state").Command;
91
- selectAll: import("prosemirror-state").Command;
92
- wrapIn: typeof wrapIn;
93
- setBlockType: typeof setBlockType;
94
- toggleMark: typeof toggleMark;
95
- autoJoin: typeof autoJoin;
96
- chainCommands: typeof chainCommands;
97
- pcBaseKeymap: {
98
- [key: string]: import("prosemirror-state").Command;
99
- };
100
- macBaseKeymap: {
101
- [key: string]: import("prosemirror-state").Command;
102
- };
103
- baseKeymap: {
104
- [key: string]: import("prosemirror-state").Command;
105
- };
106
- history: typeof history;
107
- undo: import("prosemirror-state").Command;
108
- redo: import("prosemirror-state").Command;
109
- undoDepth: typeof undoDepth;
110
- redoDepth: typeof redoDepth;
111
- InputRule: typeof InputRule;
112
- inputRules: typeof inputRules;
113
- undoInputRule: import("prosemirror-state").Command;
114
- emDash: InputRule;
115
- ellipsis: InputRule;
116
- openDoubleQuote: InputRule;
117
- closeDoubleQuote: InputRule;
118
- openSingleQuote: InputRule;
119
- closeSingleQuote: InputRule;
120
- smartQuotes: readonly InputRule[];
121
- wrappingInputRule: typeof wrappingInputRule;
122
- textblockTypeInputRule: typeof textblockTypeInputRule;
123
- keymap: typeof keymap;
124
- keydownHandler: typeof keydownHandler;
125
- orderedList: NodeSpec;
126
- bulletList: NodeSpec;
127
- listItem: NodeSpec;
128
- addListNodes: typeof addListNodes;
129
- wrapInList: typeof wrapInList;
130
- splitListItem: typeof splitListItem;
131
- liftListItem: typeof liftListItem;
132
- sinkListItem: typeof sinkListItem;
133
- dropCursor: typeof dropCursor;
134
- gapCursor: typeof gapCursor;
135
- tableEditing: typeof tableEditing;
136
- fixTables: typeof fixTables;
137
- fixTablesKey: PluginKey<{
138
- fixTables: boolean;
139
- }>;
140
- cellAround: typeof cellAround;
141
- isInTable: typeof isInTable;
142
- selectionCell: typeof selectionCell;
143
- moveCellForward: typeof moveCellForward;
144
- inSameTable: typeof inSameTable;
145
- findCell: typeof findCell;
146
- colCount: typeof colCount;
147
- nextCell: typeof nextCell;
148
- removeColSpan: typeof removeColSpan;
149
- addColSpan: typeof addColSpan;
150
- columnIsHeader: typeof columnIsHeader;
151
- tableNodes: typeof tableNodes;
152
- tableNodeTypes: typeof tableNodeTypes;
153
- CellSelection: typeof CellSelection;
154
- TableMap: typeof TableMap;
155
- tableEditingKey: PluginKey<number>;
156
- columnResizing: typeof columnResizing;
157
- columnResizingPluginKey: PluginKey<import("prosemirror-tables").ResizeState>;
158
- updateColumnsOnResize: typeof updateColumnsOnResize;
159
- selectedRect: typeof selectedRect;
160
- addColumn: typeof addColumn;
161
- addColumnBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
162
- addColumnAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
163
- deleteColumn: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
164
- rowIsHeader: typeof rowIsHeader;
165
- addRow: typeof addRow;
166
- addRowBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
167
- addRowAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
168
- deleteRow: typeof deleteRow;
169
- mergeCells: typeof mergeCells;
170
- splitCell: typeof splitCell;
171
- splitCellWithType: typeof splitCellWithType;
172
- setCellAttr: typeof setCellAttr;
173
- toggleHeader: typeof toggleHeader;
174
- toggleHeaderRow: import("prosemirror-state").Command;
175
- toggleHeaderColumn: import("prosemirror-state").Command;
176
- toggleHeaderCell: import("prosemirror-state").Command;
177
- goToNextCell: typeof goToNextCell;
178
- deleteTable: typeof deleteTable;
179
- };
180
- export { Editor, EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorTools, EditorToolsSettings, EditorUtils, EditorDialogs, NodeSpec, MarkSpec, nodes, marks, getHtml, parseContent, editorPropsKey };
8
+ import { addColSpan } from '@progress/kendo-editor-common';
9
+ import { addColumn } from '@progress/kendo-editor-common';
10
+ import { addListNodes } from '@progress/kendo-editor-common';
11
+ import { AddMarkStep } from '@progress/kendo-editor-common';
12
+ import { addRow } from '@progress/kendo-editor-common';
13
+ import { AllSelection } from '@progress/kendo-editor-common';
14
+ import { autoJoin } from '@progress/kendo-editor-common';
15
+ import { ButtonProps } from '@progress/kendo-react-buttons';
16
+ import { canJoin } from '@progress/kendo-editor-common';
17
+ import { canSplit } from '@progress/kendo-editor-common';
18
+ import { cellAround } from '@progress/kendo-editor-common';
19
+ import { CellSelection } from '@progress/kendo-editor-common';
20
+ import { chainCommands } from '@progress/kendo-editor-common';
21
+ import { colCount } from '@progress/kendo-editor-common';
22
+ import { ColorPickerProps } from '@progress/kendo-react-inputs';
23
+ import { columnIsHeader } from '@progress/kendo-editor-common';
24
+ import { columnResizing } from '@progress/kendo-editor-common';
25
+ import { Command } from 'prosemirror-state';
26
+ import { ComponentClass } from 'react';
27
+ import { ContentMatch } from '@progress/kendo-editor-common';
28
+ import { Decoration } from '@progress/kendo-editor-common';
29
+ import { DecorationSet } from '@progress/kendo-editor-common';
30
+ import { deleteRow } from '@progress/kendo-editor-common';
31
+ import { deleteTable } from '@progress/kendo-editor-common';
32
+ import { DOMParser as DOMParser_2 } from '@progress/kendo-editor-common';
33
+ import { DOMSerializer } from '@progress/kendo-editor-common';
34
+ import { dropCursor } from '@progress/kendo-editor-common';
35
+ import { DropDownListProps } from '@progress/kendo-react-dropdowns';
36
+ import { dropPoint } from '@progress/kendo-editor-common';
37
+ import { EditorState } from '@progress/kendo-editor-common';
38
+ import { EditorView } from '@progress/kendo-editor-common';
39
+ import { findCell } from '@progress/kendo-editor-common';
40
+ import { findWrapping } from '@progress/kendo-editor-common';
41
+ import { fixTables } from '@progress/kendo-editor-common';
42
+ import { Fragment } from '@progress/kendo-editor-common';
43
+ import { gapCursor } from '@progress/kendo-editor-common';
44
+ import { getHtml } from '@progress/kendo-editor-common';
45
+ import { goToNextCell } from '@progress/kendo-editor-common';
46
+ import { history as history_2 } from '@progress/kendo-editor-common';
47
+ import { ImageResizeOptions } from '@progress/kendo-editor-common';
48
+ import { InputRule } from '@progress/kendo-editor-common';
49
+ import { inputRules } from '@progress/kendo-editor-common';
50
+ import { inSameTable } from '@progress/kendo-editor-common';
51
+ import { insertPoint } from '@progress/kendo-editor-common';
52
+ import { isInTable } from '@progress/kendo-editor-common';
53
+ import { joinPoint } from '@progress/kendo-editor-common';
54
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
55
+ import { keydownHandler } from '@progress/kendo-editor-common';
56
+ import { keymap } from '@progress/kendo-editor-common';
57
+ import { liftListItem } from '@progress/kendo-editor-common';
58
+ import { liftTarget } from '@progress/kendo-editor-common';
59
+ import { Mapping } from '@progress/kendo-editor-common';
60
+ import { MapResult } from '@progress/kendo-editor-common';
61
+ import { Mark } from '@progress/kendo-editor-common';
62
+ import { marks } from '@progress/kendo-editor-common';
63
+ import { MarkSpec } from '@progress/kendo-editor-common';
64
+ import { MarkType } from '@progress/kendo-editor-common';
65
+ import { mergeCells } from '@progress/kendo-editor-common';
66
+ import { moveCellForward } from '@progress/kendo-editor-common';
67
+ import { nextCell } from '@progress/kendo-editor-common';
68
+ import { Node as Node_2 } from '@progress/kendo-editor-common';
69
+ import { NodeRange } from '@progress/kendo-editor-common';
70
+ import { nodes } from '@progress/kendo-editor-common';
71
+ import { NodeSelection } from '@progress/kendo-editor-common';
72
+ import { NodeSpec } from '@progress/kendo-editor-common';
73
+ import { NodeType } from '@progress/kendo-editor-common';
74
+ import { parseContent } from '@progress/kendo-editor-common';
75
+ import { ParseOptions } from '@progress/kendo-editor-common';
76
+ import { PasteCleanupSettings as PasteCleanupSettings_2 } from '@progress/kendo-editor-common';
77
+ import { PDFExportProps } from '@progress/kendo-react-pdf';
78
+ import { Plugin as Plugin_2 } from '@progress/kendo-editor-common';
79
+ import { PluginKey } from '@progress/kendo-editor-common';
80
+ import PropTypes from 'prop-types';
81
+ import * as React_2 from 'react';
82
+ import { redoDepth } from '@progress/kendo-editor-common';
83
+ import { removeColSpan } from '@progress/kendo-editor-common';
84
+ import { RemoveMarkStep } from '@progress/kendo-editor-common';
85
+ import { ReplaceAroundStep } from '@progress/kendo-editor-common';
86
+ import { ReplaceError } from '@progress/kendo-editor-common';
87
+ import { ReplaceStep } from '@progress/kendo-editor-common';
88
+ import { replaceStep } from '@progress/kendo-editor-common';
89
+ import { ResizeState } from 'prosemirror-tables';
90
+ import { ResolvedPos } from '@progress/kendo-editor-common';
91
+ import { rowIsHeader } from '@progress/kendo-editor-common';
92
+ import { Schema } from '@progress/kendo-editor-common';
93
+ import { selectedRect } from '@progress/kendo-editor-common';
94
+ import { Selection as Selection_2 } from '@progress/kendo-editor-common';
95
+ import { selectionCell } from '@progress/kendo-editor-common';
96
+ import { SelectionRange } from '@progress/kendo-editor-common';
97
+ import { setBlockType } from '@progress/kendo-editor-common';
98
+ import { setCellAttr } from '@progress/kendo-editor-common';
99
+ import { sinkListItem } from '@progress/kendo-editor-common';
100
+ import { Slice } from '@progress/kendo-editor-common';
101
+ import { splitCell } from '@progress/kendo-editor-common';
102
+ import { splitCellWithType } from '@progress/kendo-editor-common';
103
+ import { splitListItem } from '@progress/kendo-editor-common';
104
+ import { Step } from '@progress/kendo-editor-common';
105
+ import { StepMap } from '@progress/kendo-editor-common';
106
+ import { StepResult } from '@progress/kendo-editor-common';
107
+ import { tableEditing } from '@progress/kendo-editor-common';
108
+ import { TableMap } from '@progress/kendo-editor-common';
109
+ import { tableNodes } from '@progress/kendo-editor-common';
110
+ import { tableNodeTypes } from '@progress/kendo-editor-common';
111
+ import { textblockTypeInputRule } from '@progress/kendo-editor-common';
112
+ import { TextSelection } from '@progress/kendo-editor-common';
113
+ import { toggleHeader } from '@progress/kendo-editor-common';
114
+ import { toggleMark } from '@progress/kendo-editor-common';
115
+ import { Transaction } from '@progress/kendo-editor-common';
116
+ import { Transform } from '@progress/kendo-editor-common';
117
+ import { undoDepth } from '@progress/kendo-editor-common';
118
+ import { updateColumnsOnResize } from '@progress/kendo-editor-common';
119
+ import { wrapIn } from '@progress/kendo-editor-common';
120
+ import { wrapInList } from '@progress/kendo-editor-common';
121
+ import { wrappingInputRule } from '@progress/kendo-editor-common';
122
+
123
+ /**
124
+ * @hidden
125
+ */
126
+ declare interface ApplyColorToolProps extends BasicToolProps, EditorToolsSettings.ApplyColorSettings {
127
+ }
128
+
129
+ /**
130
+ * @hidden
131
+ */
132
+ declare interface BasicToolProps {
133
+ /**
134
+ * The `EditorView` object of the Editor component.
135
+ */
136
+ view?: EditorView;
137
+ }
138
+
139
+ /**
140
+ * @hidden
141
+ */
142
+ declare interface CleanFormattingToolProps extends ToolProps {
143
+ /**
144
+ * The settings of the tool. Use it to modify the tool appearance.
145
+ */
146
+ settings?: EditorToolsSettings.CleanFormattingSettings;
147
+ }
148
+
149
+ /**
150
+ * Represents the [KendoReact Editor component]({% slug overview_editor %}).
151
+ *
152
+ * @example
153
+ * ```jsx
154
+ * class App extends React.Component {
155
+ * render() {
156
+ * return (
157
+ * <Editor
158
+ * defaultContent="<p>Hello World</p>"
159
+ * tools={[
160
+ * [ EditorTools.Bold, EditorTools.Italic ]
161
+ * ]}
162
+ * />
163
+ * );
164
+ * }
165
+ * }
166
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
167
+ * ```
168
+ */
169
+ export declare class Editor extends React_2.Component<EditorProps, EditorStateInterface> {
170
+ /**
171
+ * @hidden
172
+ */
173
+ static propTypes: {
174
+ defaultContent: PropTypes.Requireable<string>;
175
+ value: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
176
+ defaultEditMode: PropTypes.Requireable<string>;
177
+ contentStyle: PropTypes.Requireable<object>;
178
+ dir: PropTypes.Requireable<string>;
179
+ className: PropTypes.Requireable<string>;
180
+ ariaDescribedBy: PropTypes.Requireable<string>;
181
+ ariaLabelledBy: PropTypes.Requireable<string>;
182
+ ariaLabel: PropTypes.Requireable<string>;
183
+ style: PropTypes.Requireable<object>;
184
+ tools: PropTypes.Requireable<any[]>;
185
+ keyboardNavigation: PropTypes.Requireable<boolean>;
186
+ resizable: PropTypes.Requireable<boolean>;
187
+ preserveWhitespace: PropTypes.Requireable<string | boolean>;
188
+ onMount: PropTypes.Requireable<(...args: any[]) => any>;
189
+ onFocus: PropTypes.Requireable<(...args: any[]) => any>;
190
+ onBlur: PropTypes.Requireable<(...args: any[]) => any>;
191
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
192
+ onPasteHtml: PropTypes.Requireable<(...args: any[]) => any>;
193
+ onExecute: PropTypes.Requireable<(...args: any[]) => any>;
194
+ };
195
+ /**
196
+ * @hidden
197
+ */
198
+ readonly state: EditorStateInterface;
199
+ /**
200
+ * The value of the Editor.
201
+ */
202
+ get value(): Node_2 | string;
203
+ /**
204
+ * Returns the DOM element of the Editor.
205
+ */
206
+ get element(): HTMLElement | null;
207
+ /**
208
+ * Returns the content-editable DOM element of the Editor.
209
+ */
210
+ get contentElement(): HTMLDivElement | null;
211
+ /**
212
+ * Returns the `view` object of the Editor.
213
+ */
214
+ get view(): EditorView | undefined;
215
+ private _element;
216
+ private _view?;
217
+ private _contentElement;
218
+ private iframe;
219
+ private trOnChange;
220
+ private htmlOnChange;
221
+ private pasteEvent?;
222
+ private showLicenseWatermark;
223
+ constructor(props: EditorProps);
224
+ /**
225
+ * @hidden
226
+ */
227
+ componentDidMount(): void;
228
+ /**
229
+ * @hidden
230
+ */
231
+ componentDidUpdate(prevProps: EditorProps): void;
232
+ /**
233
+ * @hidden
234
+ */
235
+ componentWillUnmount(): void;
236
+ /**
237
+ * @hidden
238
+ */
239
+ focus: () => void;
240
+ /**
241
+ * @hidden
242
+ */
243
+ render(): JSX_2.Element;
244
+ private renderDialog;
245
+ private renderTool;
246
+ private updateTools;
247
+ private initialize;
248
+ private filterTransaction;
249
+ private onPasteHtml;
250
+ private dispatchTransaction;
251
+ private onFocus;
252
+ private onBlur;
253
+ private onPaste;
254
+ }
255
+
256
+ /**
257
+ * Represents the object of the `onBlur` Editor event.
258
+ */
259
+ export declare interface EditorBlurEvent extends EditorEvent {
260
+ /**
261
+ * The native blur event.
262
+ */
263
+ nativeEvent: FocusEvent;
264
+ }
265
+
266
+ /**
267
+ * Represents the object of the `onChange` Editor event.
268
+ */
269
+ export declare interface EditorChangeEvent extends EditorEvent {
270
+ /**
271
+ * Represents the [Editor document](https://prosemirror.net/docs/guide/#doc).
272
+ */
273
+ value: Node_2;
274
+ /**
275
+ * A getter of the Editor HTML content.
276
+ * Once called, it will convert the Editor document into HTML string.
277
+ * Note that, since onChange event is triggered on every key while typing,
278
+ * this conversion may not be suitable if the Editor is dealing with large amount of content.
279
+ */
280
+ html: string;
281
+ /**
282
+ * The Editor Schema object.
283
+ */
284
+ schema: Schema;
285
+ /**
286
+ * The Transaction which causes the change.
287
+ */
288
+ transaction: Transaction;
289
+ }
290
+
291
+ /**
292
+ * @hidden
293
+ */
294
+ declare interface EditorDialogProps {
295
+ /**
296
+ * The `EditorView` object.
297
+ */
298
+ view: EditorView;
299
+ /**
300
+ * The `settings` object of the Dialog.
301
+ */
302
+ settings: any;
303
+ /**
304
+ * Represents the `dir` HTML attribute.
305
+ */
306
+ dir?: string;
307
+ /**
308
+ * The `close` event which will be triggered when the Dialog is about to be unmounted.
309
+ */
310
+ onClose: () => void;
311
+ /**
312
+ * Fires when a Dialog is about to be rendered. Used to override the default appearance of the Dialog.
313
+ */
314
+ render?: (tool: React.ReactElement<any>, args?: any) => React.ReactNode;
315
+ }
316
+
317
+ /**
318
+ * Represents a wrapping namespace for the dialog components and props of the Editor.
319
+ */
320
+ export declare namespace EditorDialogs {
321
+ /**
322
+ * The InsertLinkDialog component.
323
+ */
324
+ export class InsertLinkDialog extends InsertLinkDialog {
325
+ }
326
+ /**
327
+ * The props for the InsertLinkDialog component.
328
+ */
329
+ export interface InsertLinkDialogProps extends InsertLinkDialogProps {
330
+ }
331
+ /**
332
+ * The InsertImageDialog component.
333
+ */
334
+ export class InsertImageDialog extends InsertImageDialog {
335
+ }
336
+ /**
337
+ * The props for the InsertImageDialog component.
338
+ */
339
+ export interface InsertImageDialogProps extends InsertImageDialogProps {
340
+ }
341
+ /**
342
+ * The ViewHtmlDialog component.
343
+ */
344
+ export class ViewHtmlDialog extends ViewHtmlDialog {
345
+ }
346
+ /**
347
+ * The props for the ViewHtmlDialog component.
348
+ */
349
+ export interface ViewHtmlDialogProps extends ViewHtmlDialogProps {
350
+ }
351
+ /**
352
+ * The FindAndReplaceDialog component.
353
+ */
354
+ export class FindAndReplaceDialog extends FindAndReplaceDialog {
355
+ }
356
+ /**
357
+ * The props for the FindAndReplaceDialog component.
358
+ */
359
+ export interface FindAndReplaceDialogProps extends FindAndReplaceDialogProps {
360
+ }
361
+ }
362
+
363
+ declare interface EditorEvent {
364
+ /**
365
+ * An event target.
366
+ */
367
+ target: Editor;
368
+ }
369
+
370
+ /**
371
+ * Represents the object of the `onExecute` Editor event.
372
+ */
373
+ export declare interface EditorExecuteEvent extends EditorEvent {
374
+ /**
375
+ * The transaction that will be executed.
376
+ */
377
+ transaction: Transaction;
378
+ /**
379
+ * The state of the Editor.
380
+ */
381
+ state: EditorState;
382
+ }
383
+
384
+ /**
385
+ * Represents the object of the `onFocus` Editor event.
386
+ */
387
+ export declare interface EditorFocusEvent extends EditorEvent {
388
+ /**
389
+ * The native focus event.
390
+ */
391
+ nativeEvent: FocusEvent;
392
+ }
393
+
394
+ /**
395
+ * Represents the object of the `onMount` Editor event.
396
+ */
397
+ export declare interface EditorMountEvent extends EditorEvent {
398
+ /**
399
+ * The content-editable DOM element of the Editor.
400
+ */
401
+ dom: HTMLDivElement;
402
+ /**
403
+ * The default plugins collection of the Editor.
404
+ */
405
+ plugins: Array<Plugin_2>;
406
+ /**
407
+ * The default key bindings of the Editor.
408
+ */
409
+ shortcuts: EditorUtils.Shortcuts;
410
+ /**
411
+ * The default [viewProps](https://prosemirror.net/docs/ref/#view.DirectEditorProps) object of the Editor.
412
+ */
413
+ viewProps: {
414
+ state: EditorState;
415
+ [key: string]: any;
416
+ };
417
+ }
418
+
419
+ /**
420
+ * Represents the object of the `onPaste` Editor event.
421
+ */
422
+ export declare interface EditorPasteEvent extends EditorEvent {
423
+ /**
424
+ * The HTML that will be pasted in the Editor.
425
+ */
426
+ pastedHtml: string;
427
+ /**
428
+ * The native paste event.
429
+ */
430
+ nativeEvent: ClipboardEvent;
431
+ }
432
+
433
+ /**
434
+ * Represents the props of the [KendoReact Editor component]({% slug overview_editor %}).
435
+ */
436
+ export declare interface EditorProps {
437
+ /**
438
+ * Sets the default HTML content of the Editor.
439
+ */
440
+ defaultContent?: string;
441
+ /**
442
+ * Sets the initial edit mode of the Editor. Defaults to `iframe`.
443
+ */
444
+ defaultEditMode?: 'iframe' | 'div';
445
+ /**
446
+ * Sets styles to the content element wrapper of the Editor.
447
+ */
448
+ contentStyle?: React.CSSProperties;
449
+ /**
450
+ * Represents the `dir` HTML attribute.
451
+ */
452
+ dir?: string;
453
+ /**
454
+ * Sets additional classes to the Editor.
455
+ */
456
+ className?: string;
457
+ /**
458
+ * Sets styles to the Editor.
459
+ */
460
+ style?: React.CSSProperties;
461
+ /**
462
+ * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
463
+ */
464
+ ariaDescribedBy?: string;
465
+ /**
466
+ * Identifies the element(s) which will label the component.
467
+ */
468
+ ariaLabelledBy?: string;
469
+ /**
470
+ * The accessible label of the component.
471
+ */
472
+ ariaLabel?: string;
473
+ /**
474
+ * Specifies if the Editor will be resizable.
475
+ */
476
+ resizable?: boolean;
477
+ /**
478
+ * Sets the tools of the Editor. By default, the Editor renders no tools.
479
+ */
480
+ tools?: Array<any>;
481
+ /**
482
+ * Fires each time the Editor is about to mount.
483
+ * Useful for configuring the `EditorView` object.
484
+ * To initialize `EditorView`, use the properties of the `event` object.
485
+ */
486
+ onMount?: (event: EditorMountEvent) => EditorView | void;
487
+ /**
488
+ * Fires each time the Editor is about to insert pasted content.
489
+ * Useful for modifying pasted content.
490
+ */
491
+ onPasteHtml?: (event: EditorPasteEvent) => string | void;
492
+ /**
493
+ * Fires each time the Editor is about to apply a transaction.
494
+ * To prevent the transaction, return `false`.
495
+ */
496
+ onExecute?: (event: EditorExecuteEvent) => boolean | void;
497
+ /**
498
+ * Fires when the Editor's content element has received focus.
499
+ */
500
+ onFocus?: (event: EditorFocusEvent) => void;
501
+ /**
502
+ * Fires when the Editor's content element has lost focus.
503
+ */
504
+ onBlur?: (event: EditorBlurEvent) => void;
505
+ /**
506
+ * Fires each time the value of the Editor is about to change.
507
+ */
508
+ onChange?: (event: EditorChangeEvent) => void;
509
+ /**
510
+ * The value of the Editor.
511
+ */
512
+ value?: Node_2 | string;
513
+ /**
514
+ * If set to `false`, it will turn off the built-in keyboard navigation of the Editor's Toolbar.
515
+ */
516
+ keyboardNavigation?: boolean;
517
+ /**
518
+ * Defines the options that will be used for parsing the HTML.
519
+ * If `false` is set, the whitespace is collapsed as per HTML's rules.
520
+ * Pass `true` to preserve whitespace, but normalize newlines to spaces.
521
+ * `full` will preserve whitespace entirely.
522
+ *
523
+ * Defaults to `full`.
524
+ */
525
+ preserveWhitespace?: boolean | 'full';
526
+ }
527
+
528
+ /**
529
+ * @hidden
530
+ */
531
+ export declare const editorPropsKey: PluginKey<any>;
532
+
533
+ /**
534
+ * @hidden
535
+ */
536
+ declare interface EditorStateInterface {
537
+ view?: EditorView;
538
+ linkDialog?: boolean;
539
+ }
540
+
541
+ /**
542
+ * Represents a wrapping namespace for the tool components, props, and functions of the Editor.
543
+ */
544
+ export declare namespace EditorTools {
545
+ /**
546
+ * The props for the Align tool component of the Editor.
547
+ */
548
+ export interface AlignToolProps extends ToolProps {
549
+ }
550
+ /**
551
+ * The props for the AlignLeft tool component of the Editor.
552
+ */
553
+ export interface AlignLeftProps extends AlignToolProps {
554
+ }
555
+ /**
556
+ * The props for the AlignRight tool component of the Editor.
557
+ */
558
+ export interface AlignRightProps extends AlignToolProps {
559
+ }
560
+ /**
561
+ * The props for the AlignCenter tool component of the Editor.
562
+ */
563
+ export interface AlignCenterProps extends AlignToolProps {
564
+ }
565
+ /**
566
+ * The props for the AlignJustify tool component of the Editor.
567
+ */
568
+ export interface AlignJustifyProps extends AlignToolProps {
569
+ }
570
+ /**
571
+ * Creates the Align tool component of the Editor.
572
+ *
573
+ * @param {AlignSettings} settings
574
+ * @returns {React.ComponentClass<AlignToolProps>} - Editor's Align tool component.
575
+ */
576
+ export function createAlignTool(settings: EditorToolsSettings.AlignSettings): React_2.ComponentClass<AlignToolProps, React_2.ComponentState>;
577
+ const AlignLeft_base: React_2.ComponentClass<AlignToolProps, any>;
578
+ /**
579
+ * The AlignLeft tool component.
580
+ */
581
+ export class AlignLeft extends AlignLeft_base {
582
+ }
583
+ const AlignRight_base: React_2.ComponentClass<AlignToolProps, any>;
584
+ /**
585
+ * The AlignRight tool component.
586
+ */
587
+ export class AlignRight extends AlignRight_base {
588
+ }
589
+ const AlignCenter_base: React_2.ComponentClass<AlignToolProps, any>;
590
+ /**
591
+ * The AlignCenter tool component.
592
+ */
593
+ export class AlignCenter extends AlignCenter_base {
594
+ }
595
+ const AlignJustify_base: React_2.ComponentClass<AlignToolProps, any>;
596
+ /**
597
+ * The AlignJustify tool component.
598
+ */
599
+ export class AlignJustify extends AlignJustify_base {
600
+ }
601
+ /**
602
+ * The props for the InsertTable tool component of the Editor.
603
+ */
604
+ export interface InsertTableProps extends InsertTableToolNS.InsertTableProps {
605
+ }
606
+ /**
607
+ * Creates the InsertTable tool component of the Editor.
608
+ *
609
+ * @param {InsertTableSettings} - The settings of the InsertTable tool.
610
+ * @returns {React.ComponentClass<InsertTableProps>} - The InsertTable tool component of the Editor.
611
+ */
612
+ export function createInsertTableTool(settings: EditorToolsSettings.InsertTableSettings): React_2.ComponentClass<InsertTableProps>;
613
+ const InsertTable_base: React_2.ComponentClass<InsertTableProps, any>;
614
+ /**
615
+ * The InsertTable tool component.
616
+ */
617
+ export class InsertTable extends InsertTable_base {
618
+ }
619
+ /**
620
+ * The props of the `InsertTablePopup` component.
621
+ */
622
+ export interface InsertTablePopupProps extends InsertTablePopupNS.InsertTablePopupProps {
623
+ }
624
+ /**
625
+ * The `InsertTablePopup` component.
626
+ */
627
+ export class InsertTablePopup extends InsertTablePopupNS.InsertTablePopup {
628
+ }
629
+ /**
630
+ * The props for the DropDownList tool component for inline styling of the Editor.
631
+ */
632
+ export interface DropDownListToolProps extends FontStyleToolNS.DropDownListToolProps {
633
+ }
634
+ /**
635
+ * The props for the FontSize tool component of the Editor.
636
+ */
637
+ export interface FontSizeProps extends FontStyleToolNS.DropDownListToolProps {
638
+ }
639
+ /**
640
+ * The props for the FontName tool component of the Editor.
641
+ */
642
+ export interface FontNameProps extends FontStyleToolNS.DropDownListToolProps {
643
+ }
644
+ /**
645
+ * Creates the DropDownList tool component of the Editor which applies inline styles to inline HTML elements.
646
+ *
647
+ * @param {StyleDropDownListSettings} settings
648
+ * @returns {React.ComponentClass<DropDownListToolProps>} - The DropDownList tool component of the Editor.
649
+ */
650
+ export function createStyleDropDownList(settings: EditorToolsSettings.StyleDropDownListSettings): React_2.ComponentClass<DropDownListToolProps, React_2.ComponentState>;
651
+ const FontSize_base: React_2.ComponentClass<DropDownListToolProps, any>;
652
+ /**
653
+ * The FontSize tool component.
654
+ */
655
+ export class FontSize extends FontSize_base {
656
+ }
657
+ const FontName_base: React_2.ComponentClass<DropDownListToolProps, any>;
658
+ /**
659
+ * The FontName tool component.
660
+ */
661
+ export class FontName extends FontName_base {
662
+ }
663
+ /**
664
+ * The props for the ForeColor tool component of the Editor.
665
+ */
666
+ export interface ForeColorProps extends ApplyColorToolProps {
667
+ }
668
+ /**
669
+ * The props for the BackColor tool component of the Editor.
670
+ */
671
+ export interface BackColorProps extends ApplyColorToolProps {
672
+ }
673
+ /**
674
+ * The ForeColor tool component.
675
+ */
676
+ const ForeColor: React_2.FunctionComponent<ForeColorProps>;
677
+ /**
678
+ * The BackColor tool component.
679
+ */
680
+ const BackColor: React_2.FunctionComponent<BackColorProps>;
681
+ /**
682
+ * The props for the FormatBlock tool component of the Editor.
683
+ */
684
+ export interface FormatBlockProps extends FormatBlockToolNS.FormatBlockProps {
685
+ }
686
+ /**
687
+ * Creates the FormatBlock tool component of the Editor.
688
+ *
689
+ * @param {FormatBlockDropDownListSettings} settings
690
+ * @returns {React.ComponentClass<FormatBlockProps>} - The FormatBlock tool component of the Editor.
691
+ */
692
+ export function createFormatBlockDropDownList(settings: EditorToolsSettings.FormatBlockDropDownListSettings): React_2.ComponentClass<FormatBlockProps, React_2.ComponentState>;
693
+ const FormatBlock_base: React_2.ComponentClass<FormatBlockProps, any>;
694
+ /**
695
+ * The FormatBlock tool component.
696
+ */
697
+ export class FormatBlock extends FormatBlock_base {
698
+ }
699
+ /**
700
+ * The props for the Undo tool component of the Editor.
701
+ */
702
+ export interface UndoProps extends HistoryToolNS.UndoProps {
703
+ }
704
+ /**
705
+ * The props for the Redo tool component of the Editor.
706
+ */
707
+ export interface RedoProps extends HistoryToolNS.RedoProps {
708
+ }
709
+ /**
710
+ * Creates the Undo tool component of the Editor.
711
+ *
712
+ * @param {ToolSettings} settings
713
+ * @returns {React.ComponentClass<UndoProps>} - The Undo tool component of the Editor.
714
+ */
715
+ export function createUndoTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
716
+ /**
717
+ * Creates the Redo tool component of the Editor.
718
+ *
719
+ * @param {ToolSettings} settings
720
+ * @returns {React.ComponentClass<RedoProps>} - The Redo tool component of the Editor.
721
+ */
722
+ export function createRedoTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
723
+ const Undo_base: React_2.ComponentClass<ToolProps, any>;
724
+ /**
725
+ * The Undo tool component of the Editor.
726
+ */
727
+ export class Undo extends Undo_base {
728
+ }
729
+ const Redo_base: React_2.ComponentClass<ToolProps, any>;
730
+ /**
731
+ * The Redo tool component of the Editor.
732
+ */
733
+ export class Redo extends Redo_base {
734
+ }
735
+ /**
736
+ * The props for the Indent tool component of the Editor.
737
+ */
738
+ export interface IndentProps extends IndentToolNS.IndentProps {
739
+ }
740
+ /**
741
+ * Creates the Indent tool component of the Editor.
742
+ *
743
+ * @param {IndentationSettings} settings
744
+ * @returns {React.ComponentClass<IndentProps>} - The Indent tool component of the Editor.
745
+ */
746
+ export function createIndentTool(settings: EditorToolsSettings.IndentationSettings): React_2.ComponentClass<IndentProps, React_2.ComponentState>;
747
+ const Indent_base: React_2.ComponentClass<IndentProps, any>;
748
+ /**
749
+ * The Indent tool component.
750
+ */
751
+ export class Indent extends Indent_base {
752
+ }
753
+ /**
754
+ * The props for the InlineFormat tool component of the Editor.
755
+ */
756
+ export interface InlineFormatToolProps extends InlineFormatToolNS.InlineFormatToolProps {
757
+ }
758
+ /**
759
+ * The props for the Bold tool component of the Editor.
760
+ */
761
+ export interface BoldProps extends InlineFormatToolNS.BoldProps {
762
+ }
763
+ /**
764
+ * The props for the Italic tool component of the Editor.
765
+ */
766
+ export interface ItalicProps extends InlineFormatToolNS.ItalicProps {
767
+ }
768
+ /**
769
+ * The props for the Underline tool component of the Editor.
770
+ */
771
+ export interface UnderlineProps extends InlineFormatToolNS.UnderlineProps {
772
+ }
773
+ /**
774
+ * The props for the Strikethrough tool component of the Editor.
775
+ */
776
+ export interface StrikethroughProps extends InlineFormatToolNS.StrikethroughProps {
777
+ }
778
+ /**
779
+ * The props for the Subscript tool component of the Editor.
780
+ */
781
+ export interface SubscriptProps extends InlineFormatToolNS.SubscriptProps {
782
+ }
783
+ /**
784
+ * The props for the Superscript tool component of the Editor.
785
+ */
786
+ export interface SuperscriptProps extends InlineFormatToolNS.SuperscriptProps {
787
+ }
788
+ /**
789
+ * Creates the InlineFormat tool component of the Editor.
790
+ *
791
+ * @param {InlineFormatSettings} settings
792
+ * @returns {React.ComponentClass<InlineFormatToolProps>} - Editor's InlineFormat tool component.
793
+ */
794
+ export function createInlineFormatTool(settings: EditorToolsSettings.InlineFormatSettings): React_2.ComponentClass<InlineFormatToolProps, React_2.ComponentState>;
795
+ const Bold_base: React_2.ComponentClass<InlineFormatToolProps, any>;
796
+ /**
797
+ * The Bold tool component.
798
+ */
799
+ export class Bold extends Bold_base {
800
+ }
801
+ const Italic_base: React_2.ComponentClass<InlineFormatToolProps, any>;
802
+ /**
803
+ * The Italic tool component.
804
+ */
805
+ export class Italic extends Italic_base {
806
+ }
807
+ const Underline_base: React_2.ComponentClass<InlineFormatToolProps, any>;
808
+ /**
809
+ * The Underline tool component.
810
+ */
811
+ export class Underline extends Underline_base {
812
+ }
813
+ const Strikethrough_base: React_2.ComponentClass<InlineFormatToolProps, any>;
814
+ /**
815
+ * The Strikethrough tool component.
816
+ */
817
+ export class Strikethrough extends Strikethrough_base {
818
+ }
819
+ const Subscript_base: React_2.ComponentClass<InlineFormatToolProps, any>;
820
+ /**
821
+ * The Subscript tool component.
822
+ */
823
+ export class Subscript extends Subscript_base {
824
+ }
825
+ const Superscript_base: React_2.ComponentClass<InlineFormatToolProps, any>;
826
+ /**
827
+ * The Superscript tool component.
828
+ */
829
+ export class Superscript extends Superscript_base {
830
+ }
831
+ /**
832
+ * The props for the InsertImage tool component of the Editor.
833
+ */
834
+ export interface InsertImageProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
835
+ }
836
+ /**
837
+ * Creates the InsertImage tool component of the Editor.
838
+ *
839
+ * @param {ImageSettings} settings
840
+ * @returns {React.ComponentClass<InsertImageProps>} - The InsertImage tool component of the Editor.
841
+ */
842
+ export function createInsertImageTool(settings: EditorToolsSettings.ImageSettings): React_2.ComponentClass<InsertImageProps>;
843
+ const InsertImage_base: React_2.ComponentClass<InsertImageProps, any>;
844
+ /**
845
+ * The InsertImage tool component.
846
+ */
847
+ export class InsertImage extends InsertImage_base {
848
+ }
849
+ /**
850
+ * The props for the Link tool component of the Editor.
851
+ */
852
+ export interface LinkProps extends LinkToolNS.LinkProps {
853
+ }
854
+ /**
855
+ * Creates the Link tool component of the Editor.
856
+ *
857
+ * @param {LinkSettings} settings
858
+ * @returns {React.ComponentClass<LinkProps>} - The Link tool component of the Editor.
859
+ */
860
+ export function createLinkTool(settings: EditorToolsSettings.LinkSettings): React_2.ComponentClass<LinkProps>;
861
+ const Link_base: React_2.ComponentClass<LinkProps, any>;
862
+ /**
863
+ * The Link tool component.
864
+ */
865
+ export class Link extends Link_base {
866
+ }
867
+ const InsertFile_base: React_2.ComponentClass<LinkProps, any>;
868
+ /**
869
+ * The InsertFile tool component.
870
+ */
871
+ export class InsertFile extends InsertFile_base {
872
+ }
873
+ /**
874
+ * The base interface of `OrderedListProps` and `UnorderedListProps`.
875
+ */
876
+ export interface ListToolProps extends ListToolNS.ListToolProps {
877
+ }
878
+ /**
879
+ * The props for the OrderedList tool component of the Editor.
880
+ */
881
+ export interface OrderedListProps extends ListToolNS.OrderedListProps {
882
+ }
883
+ /**
884
+ * The props for the UnorderedList tool component of the Editor.
885
+ */
886
+ export interface UnorderedListProps extends ListToolNS.UnorderedListProps {
887
+ }
888
+ /**
889
+ * Creates the List tool component of the Editor.
890
+ *
891
+ * @param {ToolSettings} settings
892
+ * @returns {React.ComponentClass<ListToolProps>} - The List tool component of the Editor.
893
+ */
894
+ export function createListTool(settings: EditorToolsSettings.ListSettings): React_2.ComponentClass<ListToolProps, React_2.ComponentState>;
895
+ const OrderedList_base: React_2.ComponentClass<ListToolProps, any>;
896
+ /**
897
+ * The basic OrderedList tool component. Will render a button which applies `<ol>` HTML element.
898
+ */
899
+ export class OrderedList extends OrderedList_base {
900
+ }
901
+ const UnorderedList_base: React_2.ComponentClass<ListToolProps, any>;
902
+ /**
903
+ * The basic UnorderedList tool component. Will render a button which applies `<ul>` HTML element.
904
+ */
905
+ export class UnorderedList extends UnorderedList_base {
906
+ }
907
+ /**
908
+ * The BulletedList tool component.
909
+ * Will render a SplitButton which applies `<ol>` HTML element with predefined styles - disc and square.
910
+ */
911
+ const BulletedList: (props: any) => JSX_2.Element;
912
+ /**
913
+ * The NumberedList tool component.
914
+ * Will render a SplitButton which applies `<ul>` HTML element with predefined styles - upper-roman, lower-roman, upper-latin and lower-latin.
915
+ */
916
+ const NumberedList: (props: any) => JSX_2.Element;
917
+ /**
918
+ * The TableCellProperties tool component.
919
+ */
920
+ const TableCellProperties: React_2.FunctionComponent<TableCellPropertiesProps>;
921
+ /**
922
+ * The props for the TableCellProperties tool component of the Editor.
923
+ */
924
+ export interface TableCellPropertiesProps extends TableCellPropertiesProps {
925
+ }
926
+ /**
927
+ * The TableProperties tool component.
928
+ */
929
+ const TableProperties: React_2.FunctionComponent<TablePropertiesProps>;
930
+ /**
931
+ * The props for the TableProperties tool component of the Editor.
932
+ */
933
+ export interface TablePropertiesProps extends TablePropertiesProps {
934
+ }
935
+ /**
936
+ * The props for the Outdent tool component of the Editor.
937
+ */
938
+ export interface OutdentProps extends IndentToolNS.IndentProps {
939
+ }
940
+ /**
941
+ * Creates the Outdent tool component of the Editor.
942
+ *
943
+ * @param {IndentationSettings} settings
944
+ * @returns {React.ComponentClass<OutdentProps>} - The Outdent tool component of the Editor.
945
+ */
946
+ export function createOutdentTool(settings: EditorToolsSettings.IndentationSettings): React_2.ComponentClass<OutdentProps, React_2.ComponentState>;
947
+ const Outdent_base: React_2.ComponentClass<OutdentProps, any>;
948
+ /**
949
+ * The Outdent tool component.
950
+ */
951
+ export class Outdent extends Outdent_base {
952
+ }
953
+ /**
954
+ * The props for the Print tool component of the Editor.
955
+ */
956
+ export interface PrintProps extends PrintProps {
957
+ }
958
+ /**
959
+ * The Print tool component.
960
+ * Designed to work only if Editor's defaultEditMode prop is set to 'iframe'.
961
+ */
962
+ const Print: React_2.FunctionComponent<PrintProps>;
963
+ /**
964
+ * The props for the Export to PDF tool component of the Editor.
965
+ */
966
+ export interface PdfProps extends PdfProps {
967
+ }
968
+ /**
969
+ * The Export to PDF tool component.
970
+ *
971
+ * To modify the default PDF export options, see the following example:
972
+ *
973
+ * @example
974
+ * ```tsx-no-run
975
+ * import { Editor, EditorTools } from '@progress/kendo-react-editor';
976
+ * const { Bold, Italic, Pdf } = EditorTools;
977
+ *
978
+ * const PdfTool = (props: EditorTools.PdfProps) => (
979
+ * <Pdf
980
+ * {...props}
981
+ * // https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/PDFExportProps/
982
+ * savePdfOptions={{
983
+ * fileName: 'editor-export.pdf',
984
+ * paperSize: 'A5',
985
+ * margin: '1cm'
986
+ * }}
987
+ * />
988
+ * );
989
+ *
990
+ * class App extends React.Component<any, any> {
991
+ * render() {
992
+ * return (
993
+ * <Editor
994
+ * tools={[[ Bold, Italic, PdfTool ]]}
995
+ * contentStyle={{ height: 100 }}
996
+ * defaultContent="<p>text</p>"
997
+ * />
998
+ * );
999
+ * }
1000
+ * }
1001
+ * ```
1002
+ */
1003
+ const Pdf: React_2.FunctionComponent<PdfProps>;
1004
+ /**
1005
+ * The props for the SelectAll tool component of the Editor.
1006
+ */
1007
+ export interface SelectAllProps extends SelectAllToolProps {
1008
+ }
1009
+ /**
1010
+ * The SelectAll tool component.
1011
+ */
1012
+ const SelectAll: React_2.FunctionComponent<SelectAllProps>;
1013
+ /**
1014
+ * The props for the CleanFormatting tool component of the Editor.
1015
+ */
1016
+ export interface CleanFormattingProps extends CleanFormattingToolProps {
1017
+ }
1018
+ /**
1019
+ * The CleanFormatting tool component.
1020
+ */
1021
+ const CleanFormatting: React_2.FunctionComponent<CleanFormattingProps>;
1022
+ /**
1023
+ * The props for the AddRowBefore tool component of the Editor.
1024
+ */
1025
+ export interface AddRowBeforeProps extends TableEditNS.AddRowBeforeProps {
1026
+ }
1027
+ /**
1028
+ * The props for the AddRowAfter tool component of the Editor.
1029
+ */
1030
+ export interface AddRowAfterProps extends TableEditNS.AddRowAfterProps {
1031
+ }
1032
+ /**
1033
+ * The props for the AddColumnBefore tool component of the Editor.
1034
+ */
1035
+ export interface AddColumnBeforeProps extends TableEditNS.AddColumnBeforeProps {
1036
+ }
1037
+ /**
1038
+ * The props for the AddColumnAfter tool component of the Editor.
1039
+ */
1040
+ export interface AddColumnAfterProps extends TableEditNS.AddColumnAfterProps {
1041
+ }
1042
+ /**
1043
+ * The props for the DeleteRow tool component of the Editor.
1044
+ */
1045
+ export interface DeleteRowProps extends TableEditNS.DeleteRowProps {
1046
+ }
1047
+ /**
1048
+ * The props for the DeleteColumn tool component of the Editor.
1049
+ */
1050
+ export interface DeleteColumnProps extends TableEditNS.DeleteColumnProps {
1051
+ }
1052
+ /**
1053
+ * The props for the DeleteTable tool component of the Editor.
1054
+ */
1055
+ export interface DeleteTableProps extends TableEditNS.DeleteTableProps {
1056
+ }
1057
+ /**
1058
+ * The props for the MergeCells tool component of the Editor.
1059
+ */
1060
+ export interface MergeCellsProps extends TableEditNS.MergeCellsProps {
1061
+ }
1062
+ /**
1063
+ * The props for the SplitCell tool component of the Editor.
1064
+ */
1065
+ export interface SplitCellProps extends TableEditNS.SplitCellProps {
1066
+ }
1067
+ /**
1068
+ * Creates the AddRowBefore tool component of the Editor.
1069
+ *
1070
+ * @param {ToolSettings} - The settings of the AddRowBefore tool.
1071
+ * @returns {React.ComponentClass<AddRowBeforeProps>} - The AddRowBefore tool component of the Editor.
1072
+ */
1073
+ export function createAddRowBeforeTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1074
+ /**
1075
+ * Creates the AddRowAfter tool component of the Editor.
1076
+ *
1077
+ * @param {ToolSettings} - The settings of the AddRowAfter tool.
1078
+ * @returns {React.ComponentClass<AddRowAfterProps>} - The AddRowAfter tool component of the Editor.
1079
+ */
1080
+ export function createAddRowAfterTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1081
+ /**
1082
+ * Creates the AddColumnBefore tool component of the Editor.
1083
+ *
1084
+ * @param {ToolSettings} - The settings of the AddColumnBefore tool.
1085
+ * @returns {React.ComponentClass<AddColumnBeforeProps>} - The AddColumnBefore tool component of the Editor.
1086
+ */
1087
+ export function createAddColumnBeforeTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1088
+ /**
1089
+ * Creates the AddColumnAfter tool component of the Editor.
1090
+ *
1091
+ * @param {ToolSettings} - The settings of the AddColumnAfter tool.
1092
+ * @returns {React.ComponentClass<AddColumnAfterProps>} - The AddColumnAfter tool component of the Editor.
1093
+ */
1094
+ export function createAddColumnAfterTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1095
+ /**
1096
+ * Creates the DeleteRow tool component of the Editor.
1097
+ *
1098
+ * @param {ToolSettings} - The settings of the DeleteRow tool.
1099
+ * @returns {React.ComponentClass<DeleteRowProps>} - The DeleteRow tool component of the Editor.
1100
+ */
1101
+ export function createDeleteRowTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1102
+ /**
1103
+ * Creates the DeleteColumn tool component of the Editor.
1104
+ *
1105
+ * @param {ToolSettings} - The settings of the DeleteColumn tool.
1106
+ * @returns {React.ComponentClass<DeleteColumnProps>} - The DeleteColumn tool component of the Editor.
1107
+ */
1108
+ export function createDeleteColumnTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1109
+ /**
1110
+ * Creates the DeleteTable tool component of the Editor.
1111
+ *
1112
+ * @param {ToolSettings} - The settings of the DeleteTable tool.
1113
+ * @returns {React.ComponentClass<DeleteTableProps>} - The DeleteTable tool component of the Editor.
1114
+ */
1115
+ export function createDeleteTableTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1116
+ /**
1117
+ * Creates the MergeCells tool component of the Editor.
1118
+ *
1119
+ * @param {ToolSettings} - The settings of the MergeCells tool
1120
+ * @returns {React.ComponentClass<MergeCellsProps>} - The MergeCells tool component of the Editor.
1121
+ */
1122
+ export function createMergeCellsTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1123
+ /**
1124
+ * Creates the SplitCell tool component of the Editor.
1125
+ *
1126
+ * @param {ToolSettings} - The settings of the SplitCell tool.
1127
+ * @returns {React.ComponentClass<SplitCellProps>} - The SplitCell tool component of the Editor.
1128
+ */
1129
+ export function createSplitCellTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass<ToolProps, React_2.ComponentState>;
1130
+ const AddRowBefore_base: React_2.ComponentClass<ToolProps, any>;
1131
+ /**
1132
+ * The AddRowBefore tool component.
1133
+ */
1134
+ export class AddRowBefore extends AddRowBefore_base {
1135
+ }
1136
+ const AddRowAfter_base: React_2.ComponentClass<ToolProps, any>;
1137
+ /**
1138
+ * The AddRowAfter tool component.
1139
+ */
1140
+ export class AddRowAfter extends AddRowAfter_base {
1141
+ }
1142
+ const AddColumnBefore_base: React_2.ComponentClass<ToolProps, any>;
1143
+ /**
1144
+ * The AddColumnBefore tool component.
1145
+ */
1146
+ export class AddColumnBefore extends AddColumnBefore_base {
1147
+ }
1148
+ const AddColumnAfter_base: React_2.ComponentClass<ToolProps, any>;
1149
+ /**
1150
+ * The AddColumnAfter tool component.
1151
+ */
1152
+ export class AddColumnAfter extends AddColumnAfter_base {
1153
+ }
1154
+ const DeleteRow_base: React_2.ComponentClass<ToolProps, any>;
1155
+ /**
1156
+ * The DeleteRow tool component.
1157
+ */
1158
+ export class DeleteRow extends DeleteRow_base {
1159
+ }
1160
+ const DeleteColumn_base: React_2.ComponentClass<ToolProps, any>;
1161
+ /**
1162
+ * The DeleteColumn tool component.
1163
+ */
1164
+ export class DeleteColumn extends DeleteColumn_base {
1165
+ }
1166
+ const DeleteTable_base: React_2.ComponentClass<ToolProps, any>;
1167
+ /**
1168
+ * The DeleteTable tool component.
1169
+ */
1170
+ export class DeleteTable extends DeleteTable_base {
1171
+ }
1172
+ const MergeCells_base: React_2.ComponentClass<ToolProps, any>;
1173
+ /**
1174
+ * The MergeCells tool component.
1175
+ */
1176
+ export class MergeCells extends MergeCells_base {
1177
+ }
1178
+ const SplitCell_base: React_2.ComponentClass<ToolProps, any>;
1179
+ /**
1180
+ * The SplitCell tool component.
1181
+ */
1182
+ export class SplitCell extends SplitCell_base {
1183
+ }
1184
+ /**
1185
+ * The props for the Unlink tool component of the Editor.
1186
+ */
1187
+ export interface UnlinkProps extends UnlinkToolNS.UnlinkProps {
1188
+ }
1189
+ /**
1190
+ * Creates the Unlink tool component of the Editor.
1191
+ *
1192
+ * @param {UnlinkSettings} settings
1193
+ * @returns {React.ComponentClass<UnlinkProps>} - The Unlink tool component of the Editor.
1194
+ */
1195
+ export function createUnlinkTool(settings: EditorToolsSettings.UnlinkSettings): React_2.ComponentClass<UnlinkProps, React_2.ComponentState>;
1196
+ const Unlink_base: React_2.ComponentClass<UnlinkProps, any>;
1197
+ /**
1198
+ * The Unlink tool component.
1199
+ */
1200
+ export class Unlink extends Unlink_base {
1201
+ }
1202
+ /**
1203
+ * The props for the ViewHtml tool component of the Editor.
1204
+ */
1205
+ export interface ViewHtmlProps extends ViewHtmlToolNS.ViewHtmlProps {
1206
+ }
1207
+ /**
1208
+ * Creates the ViewHtml tool component of the Editor.
1209
+ *
1210
+ * @param {ViewHtmlSettings} settings
1211
+ * @returns {React.ComponentClass<ViewHtmlProps>} - The ViewHtml tool component of the Editor.
1212
+ */
1213
+ export function createViewHtmlTool(settings: EditorToolsSettings.ViewHtmlSettings): React_2.ComponentClass<ViewHtmlProps>;
1214
+ const ViewHtml_base: React_2.ComponentClass<ViewHtmlProps, any>;
1215
+ /**
1216
+ * The ViewHtml tool component.
1217
+ */
1218
+ export class ViewHtml extends ViewHtml_base {
1219
+ }
1220
+ /**
1221
+ * The FindAndReplace tool component.
1222
+ */
1223
+ export class FindAndReplace extends FindAndReplace {
1224
+ }
1225
+ /**
1226
+ * The props for the FindAndReplace tool component of the Editor.
1227
+ */
1228
+ export interface FindAndReplaceProps extends FindAndReplaceProps {
1229
+ }
1230
+ {};
1231
+ }
1232
+
1233
+ /**
1234
+ * Represents a wrapping namespace for the tool settings of the Editor.
1235
+ */
1236
+ export declare namespace EditorToolsSettings {
1237
+ /**
1238
+ * The type of the Editor command.
1239
+ */
1240
+ export type Command = 'Bold' | 'Italic' | 'Underline' | 'Strikethrough' | 'Subscript' | 'Superscript' | 'Undo' | 'Redo' | 'Link' | 'Unlink' | 'InsertImage' | 'InsertFile' | 'AlignLeft' | 'AlignCenter' | 'AlignRight' | 'AlignJustify' | 'AlignRemove' | 'OrderedList' | 'UnorderedList' | 'Indent' | 'Outdent' | 'SetContent' | 'FontSize' | 'FontName' | 'ForeColor' | 'BackColor' | 'FormatBlock' | 'InsertTable' | 'AddRowBefore' | 'AddRowAfter' | 'AddColumnBefore' | 'AddColumnAfter' | 'DeleteRow' | 'DeleteColumn' | 'DeleteTable' | 'MergeCells' | 'SplitCell' | 'CleanFormatting' | 'Custom';
1241
+ /**
1242
+ * The settings of the toolbar tools.
1243
+ */
1244
+ export interface ToolSettings {
1245
+ /**
1246
+ * The props which will be added to the Button component of the tool.
1247
+ */
1248
+ props: ButtonProps;
1249
+ /**
1250
+ * The keys of the messages that are used by the tool.
1251
+ */
1252
+ messages: {
1253
+ [key: string]: string;
1254
+ };
1255
+ /**
1256
+ * The name of the command that is used by the tool.
1257
+ */
1258
+ commandName?: Command;
1259
+ }
1260
+ /**
1261
+ * The `AlignAction` object.
1262
+ */
1263
+ export interface AlignAction {
1264
+ /**
1265
+ * The name of the target node.
1266
+ */
1267
+ node: string;
1268
+ /**
1269
+ * The styles that will be applied to the target node.
1270
+ */
1271
+ style: Array<{
1272
+ name: string;
1273
+ value: string;
1274
+ }>;
1275
+ }
1276
+ /**
1277
+ * The settings of the Align tool.
1278
+ */
1279
+ export interface AlignSettings extends ToolSettings {
1280
+ /**
1281
+ * A collection of `AlignAction` objects which defines the behavior of the Align tool.
1282
+ */
1283
+ actions: Array<AlignAction>;
1284
+ }
1285
+ /**
1286
+ * The settings of the Style tool which is presented by a DropDownList component.
1287
+ */
1288
+ export interface StyleDropDownListSettings {
1289
+ /**
1290
+ * The name of the style which will be added or removed by the Style tool.
1291
+ */
1292
+ style: string;
1293
+ /**
1294
+ * The default item of the Style tool.
1295
+ */
1296
+ defaultItem: {
1297
+ text: string;
1298
+ value: string;
1299
+ localizationKey?: string;
1300
+ };
1301
+ /**
1302
+ * The data items of the Style tool.
1303
+ */
1304
+ items: Array<{
1305
+ text: string;
1306
+ value: string;
1307
+ style?: React.CSSProperties;
1308
+ }>;
1309
+ /**
1310
+ * The name of the command that is used by the Style tool.
1311
+ */
1312
+ commandName?: Command;
1313
+ }
1314
+ /**
1315
+ * The settings of the FormatBlock tool which is presented by a DropDownList.
1316
+ */
1317
+ export interface FormatBlockDropDownListSettings {
1318
+ /**
1319
+ * The default item of the FormatBlock tool.
1320
+ */
1321
+ defaultItem: {
1322
+ text: string;
1323
+ value: string;
1324
+ localizationKey?: string;
1325
+ };
1326
+ /**
1327
+ * The data items of the FormatBlock tool.
1328
+ */
1329
+ items: Array<{
1330
+ text: string;
1331
+ value: string;
1332
+ style?: React.CSSProperties;
1333
+ }>;
1334
+ /**
1335
+ * The name of the command that is used by the FormatBlock tool.
1336
+ */
1337
+ commandName?: Command;
1338
+ }
1339
+ /**
1340
+ * The inline-formatting options.
1341
+ */
1342
+ export interface InlineFormatOptions {
1343
+ /**
1344
+ * The mark which will be applied or stripped.
1345
+ */
1346
+ mark: string;
1347
+ /**
1348
+ * The additional marks which will be stripped.
1349
+ */
1350
+ altMarks?: Array<string>;
1351
+ /**
1352
+ * An object which holds the style that will be stripped by the tool.
1353
+ */
1354
+ altStyle?: {
1355
+ /**
1356
+ * The name of the style.
1357
+ */
1358
+ name: string;
1359
+ /**
1360
+ * The regular expression which will be matched with the value of the style.
1361
+ */
1362
+ value: RegExp;
1363
+ };
1364
+ }
1365
+ /**
1366
+ * The settings of the tool which applies inline formatting.
1367
+ */
1368
+ export interface InlineFormatSettings extends ToolSettings, InlineFormatOptions {
1369
+ }
1370
+ /**
1371
+ * The settings of the ForeColor and BackColor tools.
1372
+ */
1373
+ export interface ApplyColorSettings {
1374
+ /**
1375
+ * The applied style by the tool (`color` or `background-color`).
1376
+ */
1377
+ style: string;
1378
+ /**
1379
+ * The props of the underlying [KendoReact ColorPicker component]({% slug overview_colorpicker %}).
1380
+ */
1381
+ colorPickerProps: ColorPickerProps;
1382
+ /**
1383
+ * The name of the applied command.
1384
+ */
1385
+ commandName: string;
1386
+ }
1387
+ /**
1388
+ * The setting of the IndentAction tool.
1389
+ */
1390
+ export interface IndentAction {
1391
+ node: string;
1392
+ style: string;
1393
+ rtlStyle: string;
1394
+ step: number;
1395
+ unit: string;
1396
+ }
1397
+ /**
1398
+ * The settings of the tool which applies indentation.
1399
+ */
1400
+ export interface IndentationSettings extends ToolSettings {
1401
+ actions: Array<IndentAction>;
1402
+ /**
1403
+ * The list node types of the Indent and Outdent tools.
1404
+ */
1405
+ listsTypes: {
1406
+ orderedList: string;
1407
+ bulletList: string;
1408
+ listItem: string;
1409
+ };
1410
+ }
1411
+ /**
1412
+ * The settings of the Link tool or dialog.
1413
+ */
1414
+ export interface LinkSettings extends ToolSettings {
1415
+ mark: string;
1416
+ linkTarget?: boolean;
1417
+ }
1418
+ /**
1419
+ * The settings of the Unlink tool.
1420
+ */
1421
+ export interface UnlinkSettings extends ToolSettings {
1422
+ mark: string;
1423
+ }
1424
+ /**
1425
+ * The settings of the InsertFile tool or dialog.
1426
+ */
1427
+ export interface InsertFileSettings extends LinkSettings {
1428
+ }
1429
+ /**
1430
+ * The settings of the tool which toggles lists.
1431
+ */
1432
+ export interface ListSettings extends ToolSettings {
1433
+ /**
1434
+ * The list type of the tool.
1435
+ */
1436
+ listType: string;
1437
+ /**
1438
+ * The types of the list nodes that are used by the tool.
1439
+ */
1440
+ types: {
1441
+ orderedList: string;
1442
+ bulletList: string;
1443
+ listItem: string;
1444
+ };
1445
+ }
1446
+ /**
1447
+ * The settings of the InsertTable tool.
1448
+ */
1449
+ export interface InsertTableSettings extends ToolSettings {
1450
+ }
1451
+ /**
1452
+ * The settings of the AddRowBefore tool.
1453
+ */
1454
+ export interface AddRowBeforeSettings extends ToolSettings {
1455
+ }
1456
+ /**
1457
+ * The settings of the AddRowAfter tool.
1458
+ */
1459
+ export interface AddRowAfterSettings extends ToolSettings {
1460
+ }
1461
+ /**
1462
+ * The settings of the AddColumnBefore tool.
1463
+ */
1464
+ export interface AddColumnBeforeSettings extends ToolSettings {
1465
+ }
1466
+ /**
1467
+ * The settings of the AddColumnAfter tool.
1468
+ */
1469
+ export interface AddColumnAfterSettings extends ToolSettings {
1470
+ }
1471
+ /**
1472
+ * The settings of the DeleteRow tool.
1473
+ */
1474
+ export interface DeleteRowSettings extends ToolSettings {
1475
+ }
1476
+ /**
1477
+ * The settings of the DeleteColumn tool.
1478
+ */
1479
+ export interface DeleteColumnSettings extends ToolSettings {
1480
+ }
1481
+ /**
1482
+ * The settings of the DeleteTable tool.
1483
+ */
1484
+ export interface DeleteTableSettings extends ToolSettings {
1485
+ }
1486
+ /**
1487
+ * The settings of the MergeCells tool.
1488
+ */
1489
+ export interface MergeCellsSettings extends ToolSettings {
1490
+ }
1491
+ /**
1492
+ * The settings of the SplitCell tool.
1493
+ */
1494
+ export interface SplitCellSettings extends ToolSettings {
1495
+ }
1496
+ /**
1497
+ * The settings of the Print tool.
1498
+ */
1499
+ export interface PrintSettings extends ToolSettings {
1500
+ }
1501
+ /**
1502
+ * The settings of the SelectAll tool.
1503
+ */
1504
+ export interface SelectAllSettings extends ToolSettings {
1505
+ }
1506
+ /**
1507
+ * The settings of the Pdf tool.
1508
+ */
1509
+ export interface PdfSettings extends ToolSettings {
1510
+ }
1511
+ /**
1512
+ * The settings of the CleanFormatting tool.
1513
+ */
1514
+ export interface CleanFormattingSettings extends ToolSettings {
1515
+ }
1516
+ /**
1517
+ * The settings of the InsertImage tool or dialog.
1518
+ */
1519
+ export interface ImageSettings extends ToolSettings {
1520
+ node: string;
1521
+ }
1522
+ /**
1523
+ * The settings of the ViewHtml tool or dialog.
1524
+ */
1525
+ export interface ViewHtmlSettings extends ToolSettings {
1526
+ }
1527
+ /**
1528
+ * The settings of the Find and Replace tool or dialog.
1529
+ */
1530
+ export interface FindReplaceSettings extends ToolSettings {
1531
+ }
1532
+ /**
1533
+ * The object of the Bold tool settings.
1534
+ */
1535
+ const bold: InlineFormatSettings;
1536
+ /**
1537
+ * The object of the Italic tool settings.
1538
+ */
1539
+ const italic: InlineFormatSettings;
1540
+ /**
1541
+ * The object of the Underline tool settings.
1542
+ */
1543
+ const underline: InlineFormatSettings;
1544
+ /**
1545
+ * The object of the Strikethrough tool settings.
1546
+ */
1547
+ const strikethrough: InlineFormatSettings;
1548
+ /**
1549
+ * The object of the Subscript tool settings.
1550
+ */
1551
+ const subscript: InlineFormatSettings;
1552
+ /**
1553
+ * The object of the Superscript tool settings.
1554
+ */
1555
+ const superscript: InlineFormatSettings;
1556
+ /**
1557
+ * The object of the Link tool settings.
1558
+ */
1559
+ const link: LinkSettings;
1560
+ /**
1561
+ * The object of the Link tool settings.
1562
+ */
1563
+ const insertFile: InsertFileSettings;
1564
+ /**
1565
+ * The object of the InsertTable tool settings.
1566
+ */
1567
+ const insertTable: InsertTableSettings;
1568
+ /**
1569
+ * The object of the AddRowBefore tool settings.
1570
+ */
1571
+ const addRowBefore: AddRowBeforeSettings;
1572
+ /**
1573
+ * The object of the AddRowAfter tool settings.
1574
+ */
1575
+ const addRowAfter: AddRowAfterSettings;
1576
+ /**
1577
+ * The object of the AddColumnBefore tool settings.
1578
+ */
1579
+ const addColumnBefore: AddColumnBeforeSettings;
1580
+ /**
1581
+ * The object of the AddColumnAfter tool settings.
1582
+ */
1583
+ const addColumnAfter: AddColumnAfterSettings;
1584
+ /**
1585
+ * The object of the DeleteRow tool settings.
1586
+ */
1587
+ const deleteRow: DeleteRowSettings;
1588
+ /**
1589
+ * The object of the DeleteColumn tool settings.
1590
+ */
1591
+ const deleteColumn: DeleteColumnSettings;
1592
+ /**
1593
+ * The object of the DeleteTable tool settings.
1594
+ */
1595
+ const deleteTable: DeleteTableSettings;
1596
+ /**
1597
+ * The object of the MergeCells tool settings.
1598
+ */
1599
+ const mergeCells: MergeCellsSettings;
1600
+ /**
1601
+ * The object of the SplitCell tool settings.
1602
+ */
1603
+ const splitCell: SplitCellSettings;
1604
+ /**
1605
+ * The object of the Print tool settings.
1606
+ */
1607
+ const print: PrintSettings;
1608
+ /**
1609
+ * The object of the Print tool settings.
1610
+ */
1611
+ const selectAll: SelectAllSettings;
1612
+ /**
1613
+ * The object of the Print tool settings.
1614
+ */
1615
+ const pdf: PdfSettings;
1616
+ /**
1617
+ * The PDF export options.
1618
+ *
1619
+ * const savePdfOptions = {
1620
+ * fileName: 'editor.pdf',
1621
+ * paperSize: 'A4',
1622
+ * margin: '1cm'
1623
+ * };
1624
+ */
1625
+ const savePdfOptions: PDFExportProps;
1626
+ /**
1627
+ * The object of the CleanFormatting tool settings.
1628
+ */
1629
+ const cleanFormatting: CleanFormattingSettings;
1630
+ /**
1631
+ * The object of the InsertImage tool settings.
1632
+ */
1633
+ const image: ImageSettings;
1634
+ /**
1635
+ * The object of the ViewHtml tool settings.
1636
+ */
1637
+ const viewHtml: ViewHtmlSettings;
1638
+ /**
1639
+ * The object of the Find and Replace tool settings.
1640
+ */
1641
+ const findAndReplace: FindReplaceSettings;
1642
+ /**
1643
+ * The object of the Unlink tool settings.
1644
+ */
1645
+ const unlink: UnlinkSettings;
1646
+ /**
1647
+ * The object of the Undo tool settings.
1648
+ */
1649
+ const undo: ToolSettings;
1650
+ /**
1651
+ * The object of the Redo tool settings.
1652
+ */
1653
+ const redo: ToolSettings;
1654
+ /**
1655
+ * The object of the FontSize tool settings.
1656
+ */
1657
+ const fontSize: StyleDropDownListSettings;
1658
+ /**
1659
+ * The object of the FontName tool settings.
1660
+ */
1661
+ const fontName: StyleDropDownListSettings;
1662
+ /**
1663
+ * The object of the FormatBlock tool settings.
1664
+ */
1665
+ const formatBlock: FormatBlockDropDownListSettings;
1666
+ /**
1667
+ * The object of the ForeColor tool settings.
1668
+ */
1669
+ const foreColor: ApplyColorSettings;
1670
+ /**
1671
+ * The object of the BackColor tool settings.
1672
+ */
1673
+ const backColor: ApplyColorSettings;
1674
+ /**
1675
+ * The object of the AlignLeft tool settings.
1676
+ */
1677
+ const alignLeft: AlignSettings;
1678
+ /**
1679
+ * The object of the AlignRight tool settings.
1680
+ */
1681
+ const alignRight: AlignSettings;
1682
+ /**
1683
+ * The object of the AlignCenter tool settings.
1684
+ */
1685
+ const alignCenter: AlignSettings;
1686
+ /**
1687
+ * The object of the AlignJustify tool settings.
1688
+ */
1689
+ const alignJustify: AlignSettings;
1690
+ /**
1691
+ * The object of the AlignRemove tool settings.
1692
+ */
1693
+ const alignRemove: AlignSettings;
1694
+ /**
1695
+ * The object of the Indent tool settings.
1696
+ */
1697
+ const indent: IndentationSettings;
1698
+ /**
1699
+ * The object of the Outdent tool settings.
1700
+ */
1701
+ const outdent: IndentationSettings;
1702
+ /**
1703
+ * The object of the OrderedList tool settings.
1704
+ */
1705
+ const orderedList: ListSettings;
1706
+ /**
1707
+ * The object of the UnorderedList tool settings.
1708
+ */
1709
+ const bulletList: ListSettings;
1710
+ }
1711
+
1712
+ /**
1713
+ * Represents a wrapping namespace for the utility functions, `nodes`, and `marks` objects of the Editor.
1714
+ */
1715
+ export declare namespace EditorUtils {
1716
+ /**
1717
+ * Aligns the block elements in the selection.
1718
+ *
1719
+ * @returns {boolean}&mdash;If alignment is applied to any of the elements, returns `true`.
1720
+ */
1721
+ export function alignBlocks(view: EditorView, actions: EditorToolsSettings.AlignAction[], command?: EditorToolsSettings.Command): boolean;
1722
+ /**
1723
+ * Wraps the selection in a `span` element with inline styles.
1724
+ *
1725
+ * @returns {boolean}&mdash;If a style is applied to any of the elements, returns `true`.
1726
+ */
1727
+ export function applyInlineStyle(view: EditorView, options: {
1728
+ style: string;
1729
+ value: string;
1730
+ }, command?: EditorToolsSettings.Command): boolean;
1731
+ /**
1732
+ * Applies the link mark.
1733
+ *
1734
+ * @returns {boolean}&mdash;If the link is applied, returns `true`.
1735
+ */
1736
+ export function applyLink(view: any, options: {
1737
+ mark: string;
1738
+ attrs: any;
1739
+ }, command?: EditorToolsSettings.Command): boolean;
1740
+ /**
1741
+ * Checks if any of the `list` elements in the selection can be indented.
1742
+ *
1743
+ * @returns {boolean}
1744
+ */
1745
+ export function canIndentList(state: EditorState, nodeType: NodeType): boolean;
1746
+ /**
1747
+ * Checks if a node can be inserted in the current selection.
1748
+ *
1749
+ * @param {EditorState} state&mdash;The `state` object of the Editor.
1750
+ * @param {NodeType} nodeType&mdash;The type of the node that will be inserted.
1751
+ * @returns {boolean}&mdash;The node of this type can be inserted in the current selection.
1752
+ */
1753
+ export function canInsert(state: EditorState, nodeType: NodeType): boolean;
1754
+ /**
1755
+ * Checks if any of the `list` elements in the selection can be outdented.
1756
+ *
1757
+ * @returns {boolean}
1758
+ */
1759
+ export function canOutdentList(state: EditorState, listsTypes: {
1760
+ listItem: string;
1761
+ orderedList: string;
1762
+ bulletList: string;
1763
+ }): boolean;
1764
+ /**
1765
+ * Converts the MS Word lists into HTML lists.
1766
+ *
1767
+ * @param {string} html&mdash;The input HTML.
1768
+ * @returns {string}&mdash;The result HTML.
1769
+ */
1770
+ export function convertMsLists(html: string): string;
1771
+ /**
1772
+ * Creates an Editor document from HTML content.
1773
+ *
1774
+ * @param {Schema} schema&mdash;The `schema` object of the Editor.
1775
+ * @param {string} html&mdash;The HTML content.
1776
+ * @param {ParseOptions} parseOptions&mdash;The HTML parsing options. Defaults to `{ preserveWhitespace: 'full' }`.
1777
+ * @returns {Node}&mdash;The `document` object of the Editor.
1778
+ */
1779
+ export function createDocument(schema: Schema<any, any>, html: string, parseOptions?: ParseOptions): Node_2;
1780
+ /**
1781
+ * Creates a table.
1782
+ *
1783
+ * @param {object} tableTypes&mdash;An object which contains `table`, `table_row`, and `table_cell` node types.
1784
+ * @param {number} rows&mdash;The number of rows.
1785
+ * @param {number} columns&mdash;The number of columns.
1786
+ * @returns {Node}&mdash;The generated table.
1787
+ *
1788
+ * @example
1789
+ * ```jsx-no-run
1790
+ * import { EditorUtils } from '@progress/kendo-react-editor';
1791
+ *
1792
+ * const nodes = editorRef.view.state.schema.nodes;
1793
+ * const rows = 3;
1794
+ * const columns = 4;
1795
+ *
1796
+ * const table = EditorUtils.createTable(nodes, rows, columns);
1797
+ * ```
1798
+ */
1799
+ export function createTable(tableTypes: {
1800
+ table: NodeType;
1801
+ table_row: NodeType;
1802
+ table_cell: NodeType;
1803
+ }, rows: number, columns: number): Node_2;
1804
+ /**
1805
+ * Formats the paragraph and heading nodes in the selection.
1806
+ *
1807
+ * @returns {boolean}&mdash;If an element is formatted, returns `true`.
1808
+ */
1809
+ export function formatBlockElements(view: EditorView, value: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6', commandName?: EditorToolsSettings.Command): boolean;
1810
+ /**
1811
+ * Returns the paragraph and heading nodes in the selection.
1812
+ *
1813
+ * @returns {string[]}
1814
+ */
1815
+ export function getBlockFormats(state: EditorState): string[];
1816
+ /**
1817
+ * Gets the HTML from the `EditorState` object.
1818
+ *
1819
+ * @param {EditorState} state&mdash;The `state` object of the Editor or an object containing editor's `doc` and `schema`
1820
+ *&mdash;{ doc: value, schema: value.types.schema } where the `value` variable is the editor's value prop.
1821
+ * @returns {string}&mdash;The HTML content.
1822
+ */
1823
+ export function getHtml(state: EditorState | {
1824
+ doc: Node_2;
1825
+ schema: Schema;
1826
+ }): string;
1827
+ /**
1828
+ * @returns {string[]}&mdash;An array of matched styles that are found in the selection.
1829
+ */
1830
+ export function getInlineStyles(state: EditorState, style: {
1831
+ name: string;
1832
+ value: RegExp;
1833
+ }): string[];
1834
+ /**
1835
+ * Returns a mark of the specified type from the nodes in selection.
1836
+ *
1837
+ * @returns {Mark}
1838
+ */
1839
+ export function getMark(state: EditorState, markType: MarkType): Mark | undefined;
1840
+ /**
1841
+ * Checks if according to the specified `InlineFormatOptions` a node in the selection is present.
1842
+ *
1843
+ * @returns {boolean}
1844
+ */
1845
+ export function hasMark(state: EditorState, options: EditorToolsSettings.InlineFormatOptions): boolean;
1846
+ /**
1847
+ * Checks if the selection contains a specific type of node.
1848
+ *
1849
+ * @returns {boolean}
1850
+ */
1851
+ export function hasNode(state: EditorState, nodeType: NodeType): boolean;
1852
+ /**
1853
+ * Indents the block elements in the selection.
1854
+ *
1855
+ * @returns {boolean}&mdash;If indentation is applied to any of the elements, returns `true`.
1856
+ */
1857
+ export function indentBlocks(view: EditorView, actions: EditorToolsSettings.IndentAction[], command?: EditorToolsSettings.Command, dir?: string): boolean;
1858
+ /**
1859
+ * Adds new lines after block elements and hard breaks.
1860
+ *
1861
+ * @param {string} content&mdash;The HTML content.
1862
+ * @returns {string}&mdash;The indented HTML.
1863
+ */
1864
+ export function indentHtml(content: string): string;
1865
+ /**
1866
+ * Inserts a node in the selection.
1867
+ *
1868
+ * @param {EditorView} view&mdash;The `view` object of the Editor.
1869
+ * @param {Node} node&mdash;A `node` object of the Editor.
1870
+ * @param {boolean} scrollIntoView&mdash;An optional parameter.
1871
+ * Defines if the content element will be scrolled to the current selection.
1872
+ */
1873
+ export function insertNode(view: EditorView | {
1874
+ state: EditorState;
1875
+ dispatch: (tr: Transaction) => void;
1876
+ }, node: Node_2, scrollIntoView?: boolean | undefined): void;
1877
+ /**
1878
+ * Checks if any of the block elements in the selection is aligned.
1879
+ *
1880
+ * @returns {boolean}
1881
+ */
1882
+ export function isAligned(state: EditorState, actions: EditorToolsSettings.AlignAction[]): boolean;
1883
+ /**
1884
+ * Checks if any of the block elements in the selection is indented.
1885
+ *
1886
+ * @returns {boolean}
1887
+ */
1888
+ export function isIndented(state: any, actions: EditorToolsSettings.IndentAction[], dir?: string): boolean;
1889
+ /**
1890
+ * Removes the comments from the HTML.
1891
+ *
1892
+ * @param {string} html&mdash;The input HTML.
1893
+ * @returns {string}&mdash;The result HTML.
1894
+ *
1895
+ * @example
1896
+ * ```jsx-no-run
1897
+ * import { EditorUtils } from '@progress/kendo-react-editor';
1898
+ * const html = EditorUtils.removeComments('<p>some content<!-- comment --></p>');
1899
+ * ```
1900
+ */
1901
+ export function removeComments(html: string): string;
1902
+ /**
1903
+ * Removes the specified tag from the HTML and keeps its child nodes.
1904
+ *
1905
+ * @param {string} html&mdash;The input HTML.
1906
+ * @param {string} tag&mdash;A tag or multiple tags separated by a vertical slash which will be removed.
1907
+ * For example, `span` or `b|i|u|span`.
1908
+ * @returns {string}&mdash;The resulting HTML.
1909
+ *
1910
+ * @example
1911
+ * ```jsx-no-run
1912
+ * import { EditorUtils } from '@progress/kendo-react-editor';
1913
+ * const html = EditorUtils.removeTag('<p>some <span>content</span></p>', 'span|p');
1914
+ * ```
1915
+ */
1916
+ export function removeTag(html: string, tag: string): string;
1917
+ /**
1918
+ * A function for sanitizing the content on paste ([see example]({% slug paste_editor %})).
1919
+ *
1920
+ * @param {string} html&mdash;The input HTML.
1921
+ * @param {PasteCleanupSettings} settings&mdash;The settings used for sanitizing the content.
1922
+ * @returns {string}&mdash;The resulting HTML.
1923
+ */
1924
+ export function pasteCleanup(html: string, settings: PasteCleanupSettings): string;
1925
+ /**
1926
+ * A function for sanitizing the CSS classes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
1927
+ * The function will remove any class attribute which value starts with `Mso`.
1928
+ * For example `<p class="MsoNormal">pasted from MS Word</p>` will result in `<p>pasted from MS Word</p>`.
1929
+ *
1930
+ * @param {Attr} attr&mdash;The DOM class attribute that will be sanitized.
1931
+ */
1932
+ export function sanitizeClassAttr(attr: Attr): void;
1933
+ /**
1934
+ * A function for sanitizing the style attributes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
1935
+ * The function will loop through all styles and will remove those that are invalid.
1936
+ * For example `<p><span style='color:#7C7C7C;mso-themecolor:accent3;mso-themeshade:191;background:silver;'>content</span></p>`,
1937
+ * will result in `<p><span style="color: #7C7C7C; background: silver;">content</span></p>`.
1938
+ *
1939
+ * @param {Attr} attr&mdash;The DOM style attribute that will be sanitized.
1940
+ */
1941
+ export function sanitizeStyleAttr(attr: Attr): void;
1942
+ /**
1943
+ * A function that will remove a DOM attribute from the pasted content ([see example]({% slug paste_editor %})).
1944
+ *
1945
+ * @param {Attr} attr&mdash;The DOM attribute that will be removed.
1946
+ */
1947
+ export function removeAttribute(attr: Attr): void;
1948
+ /**
1949
+ * Removes the invalid HTML.
1950
+ *
1951
+ * @param {string} html&mdash;The HTML which will be sanitized.
1952
+ * @returns {string}&mdash;The sanitized HTML.
1953
+ *
1954
+ * @example
1955
+ * ```jsx-no-run
1956
+ * import { EditorUtils } from '@progress/kendo-react-editor';
1957
+ * const html = EditorUtils.sanitize('something pasted from MS Word, containing <o:p>, <w:sdtPr>, <v:shapes tags');
1958
+ * ```
1959
+ */
1960
+ export function sanitize(html: string): string;
1961
+ /**
1962
+ * If the input `html` contains images with 'src' pointing to local file system (it happens when pasting images and text from MS Word),
1963
+ * the function will extract the images sources from the RTF in base64 format and replace them in the input `html`.
1964
+ *
1965
+ * @param html&mdash;The input HTML (pasted HTML).
1966
+ * @param clipboardData&mdash;The paste event clipboardData object (event.clipboardData).
1967
+ * @returns&mdash;The html with the replaced images sources.
1968
+ */
1969
+ export function replaceImageSourcesFromRtf(html: string, clipboardData: DataTransfer): string;
1970
+ /**
1971
+ * Creates a plugin which highlights the matches of Find and Replace dialog.
1972
+ *
1973
+ * @param {PluginKey} key&mdash;The key of the plugin (Optional).
1974
+ * @returns {Plugin}&mdash;The text highlight plugin.
1975
+ */
1976
+ export function textHighlight(key?: PluginKey): Plugin_2;
1977
+ /**
1978
+ * The image resizing plugin options.
1979
+ */
1980
+ export interface ImageResizeOptions extends ImageResizeOptions {
1981
+ }
1982
+ /**
1983
+ * Creates a plugin which adds image resizing functionality.
1984
+ *
1985
+ * @param {ImageResizeOptions} options&mdash;The resizing option (Optional).
1986
+ * @returns {Plugin}&mdash;The image resizing plugin.
1987
+ */
1988
+ export function imageResizing(options?: ImageResizeOptions): Plugin_2;
1989
+ /**
1990
+ * Returns a collection of plugins that adds table resizing functionality.
1991
+ *
1992
+ * @returns {Plugin[]}&mdash;The table resizing plugins.
1993
+ */
1994
+ export function tableResizing(): Plugin_2[];
1995
+ /**
1996
+ * Sets the HTML to the `EditorView`.
1997
+ *
1998
+ * @param {EditorView} view&mdash;The `view` object of the Editor.
1999
+ * @param {string} html&mdash;The HTML content.
2000
+ * @param {Command} command&mdash;An optional parameter.
2001
+ * Defines the type of the command that will be set to the `setHtml` metadata of the transaction.
2002
+ * Defaults to `SetContent`.
2003
+ * @param {ParseOptions} parseOptions&mdash;An optional parameter.
2004
+ * Defines the options that will be used for parsing the HTML. Defaults to `{ preserveWhitespace: 'full' }`.
2005
+ */
2006
+ export function setHtml(view: EditorView, html: string, command?: EditorToolsSettings.Command, parseOptions?: ParseOptions): void;
2007
+ /**
2008
+ * Toggles the inline element formatting according to the `InlineFormatOptions` and `markAttrs` settings.
2009
+ *
2010
+ * @returns {boolean}
2011
+ */
2012
+ export function toggleInlineFormat(view: {
2013
+ state: EditorState;
2014
+ dispatch: (tr: Transaction) => void;
2015
+ }, options: EditorToolsSettings.InlineFormatOptions, transaction?: Transaction, markAttrs?: any): boolean;
2016
+ /**
2017
+ * Toggles a list of the specified type.
2018
+ *
2019
+ * @returns {boolean}
2020
+ */
2021
+ export function toggleList(view: EditorView, types: {
2022
+ listType: string;
2023
+ orderedList: string;
2024
+ bulletList: string;
2025
+ listItem: string;
2026
+ }, command?: EditorToolsSettings.Command): boolean;
2027
+ /**
2028
+ * Represents the `Shortcuts` object.
2029
+ */
2030
+ export interface Shortcuts extends shortcuts.Shortcuts {
2031
+ }
2032
+ /**
2033
+ * A function which returns the mapped `Shortcuts` object based on the passed settings.
2034
+ * Useful when the default Editor nodes or tool settings are changed and the `Shortcuts` object has to be regenerated.
2035
+ *
2036
+ * @params&mdash;An object which holds specific types of nodes and tool settings that are used by the default `Shortcuts` handlers.
2037
+ * @returns&mdash;An object which holds the shortcuts.
2038
+ */
2039
+ export function getShortcuts(settings?: {
2040
+ types?: {
2041
+ listItem: string;
2042
+ hardBreak: string;
2043
+ };
2044
+ toolsSettings?: {
2045
+ bold?: EditorToolsSettings.InlineFormatOptions;
2046
+ italic?: EditorToolsSettings.InlineFormatOptions;
2047
+ underline?: EditorToolsSettings.InlineFormatOptions;
2048
+ };
2049
+ }): Shortcuts;
2050
+ /**
2051
+ * The `PluginKey` used in the Editor to pass editor props to the tools.
2052
+ */
2053
+ const propsKey: PluginKey;
2054
+ /**
2055
+ * The `PluginKey` used in the Editor by the image resizing plugin.
2056
+ */
2057
+ const imageResizeKey: PluginKey;
2058
+ /**
2059
+ * Represents the `marks` object of the Editor.
2060
+ */
2061
+ const marks: {
2062
+ [mark: string]: MarkSpec;
2063
+ };
2064
+ /**
2065
+ * Represents the `nodes` object of the Editor.
2066
+ */
2067
+ const nodes: {
2068
+ [node: string]: NodeSpec;
2069
+ };
2070
+ }
2071
+
2072
+ /**
2073
+ * @hidden
2074
+ */
2075
+ declare class FindAndReplace extends React_2.Component<FindAndReplaceProps, FindAndReplaceState> {
2076
+ /**
2077
+ * @hidden
2078
+ */
2079
+ state: {
2080
+ showDialog: boolean;
2081
+ };
2082
+ /**
2083
+ * @hidden
2084
+ */
2085
+ render(): (false | JSX_2.Element | undefined)[];
2086
+ private onClose;
2087
+ private onOpen;
2088
+ }
2089
+
2090
+ /**
2091
+ * @hidden
2092
+ */
2093
+ declare class FindAndReplaceDialog extends React_2.Component<FindAndReplaceDialogProps, FindAndReplaceDialogState> {
2094
+ /**
2095
+ * @hidden
2096
+ */
2097
+ state: FindAndReplaceDialogState;
2098
+ private get settings();
2099
+ constructor(props: FindAndReplaceDialogProps);
2100
+ /**
2101
+ * @hidden
2102
+ */
2103
+ componentDidUpdate(_: FindAndReplaceDialogProps, prevState: FindAndReplaceDialogState): void;
2104
+ /**
2105
+ * @hidden
2106
+ */
2107
+ render(): JSX_2.Element;
2108
+ private onTabSelect;
2109
+ private onClose;
2110
+ private matchesMessage;
2111
+ private onFindNext;
2112
+ private onFindPrev;
2113
+ private onFind;
2114
+ private onReplace;
2115
+ private onReplaceAll;
2116
+ private onKeyDown;
2117
+ private onMatchCaseChecked;
2118
+ private onMatchWordChecked;
2119
+ private onMatchCyclicChecked;
2120
+ private onUseRegExpChecked;
2121
+ private onSearchChange;
2122
+ private onReplaceChange;
2123
+ private setNextState;
2124
+ }
2125
+
2126
+ /**
2127
+ * @hidden
2128
+ */
2129
+ declare interface FindAndReplaceDialogProps {
2130
+ /**
2131
+ * The `EditorView` object.
2132
+ */
2133
+ view: EditorView;
2134
+ /**
2135
+ * The `settings` object of the Dialog.
2136
+ */
2137
+ settings?: EditorToolsSettings.FindReplaceSettings;
2138
+ /**
2139
+ * Represents the `dir` HTML attribute.
2140
+ */
2141
+ dir?: string;
2142
+ /**
2143
+ * The `close` event which will be triggered when the Dialog is about to be unmounted.
2144
+ */
2145
+ onClose: () => void;
2146
+ }
2147
+
2148
+ declare interface FindAndReplaceDialogState {
2149
+ selectedTab: number;
2150
+ matches?: TextSelection[];
2151
+ nextMatch?: TextSelection;
2152
+ searchText: string;
2153
+ replaceText: string;
2154
+ matchCase: boolean;
2155
+ matchWord: boolean;
2156
+ matchCyclic: boolean;
2157
+ useRegExp: boolean;
2158
+ }
2159
+
2160
+ /**
2161
+ * @hidden
2162
+ */
2163
+ declare interface FindAndReplaceProps extends BasicToolProps, ButtonProps {
2164
+ }
2165
+
2166
+ declare interface FindAndReplaceState {
2167
+ showDialog: boolean;
2168
+ }
2169
+
2170
+ /**
2171
+ * @hidden
2172
+ */
2173
+ declare namespace FontStyleToolNS {
2174
+ /**
2175
+ * @hidden
2176
+ */
2177
+ interface DropDownListToolProps extends BasicToolProps, ToolRenderProp, DropDownListProps {
2178
+ }
2179
+ /**
2180
+ * @hidden
2181
+ */
2182
+ interface FontSizeProps extends DropDownListToolProps {
2183
+ }
2184
+ /**
2185
+ * @hidden
2186
+ */
2187
+ interface FontNameProps extends DropDownListToolProps {
2188
+ }
2189
+ /**
2190
+ * @hidden
2191
+ */
2192
+ const createStyleDropDownList: (settings: EditorToolsSettings.StyleDropDownListSettings) => React_2.ComponentClass<DropDownListToolProps, any>;
2193
+ }
2194
+
2195
+ /**
2196
+ * @hidden
2197
+ */
2198
+ declare namespace FormatBlockToolNS {
2199
+ /**
2200
+ * @hidden
2201
+ */
2202
+ interface FormatBlockProps extends BasicToolProps, ToolRenderProp, DropDownListProps {
2203
+ }
2204
+ /**
2205
+ * @hidden
2206
+ */
2207
+ const createFormatBlockDropDownList: (settings: EditorToolsSettings.FormatBlockDropDownListSettings) => React_2.ComponentClass<FormatBlockProps, any>;
2208
+ }
2209
+
2210
+ export { getHtml }
2211
+
2212
+ /**
2213
+ * @hidden
2214
+ */
2215
+ declare const getShortcuts: (settings?: {
2216
+ types?: {
2217
+ listItem: string;
2218
+ hardBreak: string;
2219
+ };
2220
+ toolsSettings?: {
2221
+ bold?: EditorToolsSettings.InlineFormatOptions;
2222
+ italic?: EditorToolsSettings.InlineFormatOptions;
2223
+ underline?: EditorToolsSettings.InlineFormatOptions;
2224
+ };
2225
+ }) => Shortcuts;
2226
+
2227
+ /**
2228
+ * @hidden
2229
+ */
2230
+ declare namespace HistoryToolNS {
2231
+ /**
2232
+ * @hidden
2233
+ */
2234
+ interface UndoProps extends ToolProps {
2235
+ }
2236
+ /**
2237
+ * @hidden
2238
+ */
2239
+ interface RedoProps extends ToolProps {
2240
+ }
2241
+ /**
2242
+ * @hidden
2243
+ */
2244
+ const createUndoTool: (settings: EditorToolsSettings.ToolSettings) => React_2.ComponentClass<ToolProps, React_2.ComponentState>;
2245
+ /**
2246
+ * @hidden
2247
+ */
2248
+ const createRedoTool: (settings: EditorToolsSettings.ToolSettings) => React_2.ComponentClass<ToolProps, any>;
2249
+ }
2250
+
2251
+ /**
2252
+ * @hidden
2253
+ */
2254
+ declare namespace IndentToolNS {
2255
+ /**
2256
+ * @hidden
2257
+ */
2258
+ interface IndentProps extends ToolProps {
2259
+ }
2260
+ /**
2261
+ * @hidden
2262
+ */
2263
+ const createIndentTool: (settings: EditorToolsSettings.IndentationSettings) => React_2.ComponentClass<IndentProps, any>;
2264
+ }
2265
+
2266
+ /**
2267
+ * @hidden
2268
+ */
2269
+ declare namespace InlineFormatToolNS {
2270
+ /**
2271
+ * @hidden
2272
+ */
2273
+ interface InlineFormatToolProps extends ToolProps {
2274
+ }
2275
+ /**
2276
+ * @hidden
2277
+ */
2278
+ interface BoldProps extends InlineFormatToolProps {
2279
+ }
2280
+ /**
2281
+ * @hidden
2282
+ */
2283
+ interface ItalicProps extends InlineFormatToolProps {
2284
+ }
2285
+ /**
2286
+ * @hidden
2287
+ */
2288
+ interface UnderlineProps extends InlineFormatToolProps {
2289
+ }
2290
+ /**
2291
+ * @hidden
2292
+ */
2293
+ interface StrikethroughProps extends InlineFormatToolProps {
2294
+ }
2295
+ /**
2296
+ * @hidden
2297
+ */
2298
+ interface SubscriptProps extends InlineFormatToolProps {
2299
+ }
2300
+ /**
2301
+ * @hidden
2302
+ */
2303
+ interface SuperscriptProps extends InlineFormatToolProps {
2304
+ }
2305
+ /**
2306
+ * @hidden
2307
+ */
2308
+ const createInlineFormatTool: (settings: EditorToolsSettings.InlineFormatSettings) => React_2.ComponentClass<InlineFormatToolProps, any>;
2309
+ }
2310
+
2311
+ /**
2312
+ * @hidden
2313
+ */
2314
+ declare class InsertImageDialog extends React_2.Component<InsertImageDialogProps> {
2315
+ private src;
2316
+ private altText;
2317
+ private title;
2318
+ private width;
2319
+ private height;
2320
+ /**
2321
+ * @hidden
2322
+ */
2323
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
2324
+ private onClose;
2325
+ private onInsert;
2326
+ }
2327
+
2328
+ /**
2329
+ * @hidden
2330
+ */
2331
+ declare interface InsertImageDialogProps extends EditorDialogProps {
2332
+ /**
2333
+ * The `ImageSettings` object.
2334
+ */
2335
+ settings: EditorToolsSettings.ImageSettings;
2336
+ }
2337
+
2338
+ /**
2339
+ * @hidden
2340
+ */
2341
+ declare class InsertLinkDialog extends React_2.Component<InsertLinkDialogProps> {
2342
+ private href;
2343
+ private title;
2344
+ private target;
2345
+ /**
2346
+ * @hidden
2347
+ */
2348
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
2349
+ private onClose;
2350
+ private onInsert;
2351
+ }
2352
+
2353
+ /**
2354
+ * @hidden
2355
+ */
2356
+ declare interface InsertLinkDialogProps extends EditorDialogProps {
2357
+ /**
2358
+ * The `LinkSettings` object.
2359
+ */
2360
+ settings: EditorToolsSettings.LinkSettings;
2361
+ }
2362
+
2363
+ /**
2364
+ * @hidden
2365
+ */
2366
+ declare namespace InsertTablePopupNS {
2367
+ /**
2368
+ * @hidden
2369
+ */
2370
+ interface InsertTablePopupProps {
2371
+ /**
2372
+ * The element which will be used as an anchor.
2373
+ */
2374
+ anchor: HTMLButtonElement | null;
2375
+ /**
2376
+ * Controls the visibility of the Popup.
2377
+ */
2378
+ show: boolean;
2379
+ /**
2380
+ * The `Create a table` message.
2381
+ */
2382
+ createTableMessage: string;
2383
+ /**
2384
+ * The `Create a {0} x {1} table` message.
2385
+ */
2386
+ createTableHintMessage: string;
2387
+ /**
2388
+ * The number of rows.
2389
+ */
2390
+ rows?: number;
2391
+ /**
2392
+ * The number of columns.
2393
+ */
2394
+ columns?: number;
2395
+ /**
2396
+ * The `dir` HTML attribute.
2397
+ */
2398
+ dir?: string;
2399
+ /**
2400
+ * The `close` event which will be triggered when the `InsertTablePopup` is about to be closed.
2401
+ */
2402
+ onClose: () => void;
2403
+ /**
2404
+ * The `onTableInsert` event which will be triggered when a cell in `InsertTablePopup` is clicked.
2405
+ */
2406
+ onTableInsert: (row: number, col: number) => void;
2407
+ }
2408
+ /**
2409
+ * @hidden
2410
+ */
2411
+ class InsertTablePopup extends React_2.Component<InsertTablePopupProps> {
2412
+ /**
2413
+ * @hidden
2414
+ */
2415
+ static propTypes: {
2416
+ show: PropTypes.Validator<boolean>;
2417
+ createTableMessage: PropTypes.Validator<string>;
2418
+ createTableHintMessage: PropTypes.Validator<string>;
2419
+ onClose: PropTypes.Validator<(...args: any[]) => any>;
2420
+ onTableInsert: PropTypes.Validator<(...args: any[]) => any>;
2421
+ anchor: PropTypes.Requireable<any>;
2422
+ rows: PropTypes.Requireable<number>;
2423
+ columns: PropTypes.Requireable<number>;
2424
+ dir: PropTypes.Requireable<string>;
2425
+ };
2426
+ /**
2427
+ * @hidden
2428
+ */
2429
+ static defaultProps: {
2430
+ rows: number;
2431
+ columns: number;
2432
+ };
2433
+ private pointerdown;
2434
+ /**
2435
+ * @hidden
2436
+ */
2437
+ componentDidUpdate(prevProps: InsertTablePopupProps): void;
2438
+ /**
2439
+ * @hidden
2440
+ */
2441
+ componentDidMount(): void;
2442
+ /**
2443
+ * @hidden
2444
+ */
2445
+ componentWillUnmount(): void;
2446
+ /**
2447
+ * @hidden
2448
+ */
2449
+ render(): JSX_2.Element;
2450
+ private onWindowDown;
2451
+ private onPointerDown;
2452
+ }
2453
+ }
2454
+
2455
+ /**
2456
+ * @hidden
2457
+ */
2458
+ declare namespace InsertTableToolNS {
2459
+ /**
2460
+ * @hidden
2461
+ */
2462
+ interface InsertTableProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
2463
+ }
2464
+ /**
2465
+ * @hidden
2466
+ */
2467
+ interface InsertTableToolState {
2468
+ openedPopup: boolean;
2469
+ }
2470
+ /**
2471
+ * @hidden
2472
+ */
2473
+ const createInsertTableTool: (settings: EditorToolsSettings.InsertTableSettings) => React_2.ComponentClass<InsertTableProps, InsertTableToolState>;
2474
+ }
2475
+
2476
+ /**
2477
+ * @hidden
2478
+ */
2479
+ declare namespace LinkToolNS {
2480
+ /**
2481
+ * @hidden
2482
+ */
2483
+ interface LinkProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
2484
+ }
2485
+ /**
2486
+ * @hidden
2487
+ */
2488
+ interface LinkToolState {
2489
+ openedDialog: boolean;
2490
+ }
2491
+ /**
2492
+ * @hidden
2493
+ */
2494
+ const createLinkTool: (settings: EditorToolsSettings.LinkSettings) => React_2.ComponentClass<LinkProps, LinkToolState>;
2495
+ }
2496
+
2497
+ /**
2498
+ * @hidden
2499
+ */
2500
+ declare namespace ListToolNS {
2501
+ /**
2502
+ * @hidden
2503
+ */
2504
+ interface ListToolProps extends ToolProps {
2505
+ }
2506
+ /**
2507
+ * @hidden
2508
+ */
2509
+ interface OrderedListProps extends ListToolProps {
2510
+ }
2511
+ /**
2512
+ * @hidden
2513
+ */
2514
+ interface UnorderedListProps extends ListToolProps {
2515
+ }
2516
+ /**
2517
+ * @hidden
2518
+ */
2519
+ const createListTool: (settings: EditorToolsSettings.ListSettings) => React_2.ComponentClass<ListToolProps, any>;
2520
+ }
2521
+
2522
+ export { marks }
2523
+
2524
+ export { MarkSpec }
2525
+
2526
+ export { nodes }
2527
+
2528
+ export { NodeSpec }
2529
+
2530
+ export { parseContent }
2531
+
2532
+ /**
2533
+ * The settings passed to `pasteCleanup` function ([see example]({% slug paste_editor %})).
2534
+ */
2535
+ export declare interface PasteCleanupSettings extends PasteCleanupSettings_2 {
2536
+ }
2537
+
2538
+ /**
2539
+ * @hidden
2540
+ */
2541
+ declare interface PdfProps extends ToolProps {
2542
+ /**
2543
+ * The settings of the tool. Use it to modify the tool appearance.
2544
+ */
2545
+ settings?: EditorToolsSettings.PdfSettings;
2546
+ /**
2547
+ * The options which will be passed to the [`savePDF`]({% slug api_pdf_savepdf %}) function.
2548
+ */
2549
+ savePdfOptions?: PDFExportProps;
2550
+ /**
2551
+ * The callback which will be passed to the [`savePDF`]({% slug api_pdf_savepdf %}) function.
2552
+ */
2553
+ savePdfCallback?: () => void;
2554
+ }
2555
+
2556
+ /**
2557
+ * @hidden
2558
+ */
2559
+ declare interface PrintProps extends ToolProps {
2560
+ /**
2561
+ * The settings of the tool. Use it to modify the tool appearance.
2562
+ */
2563
+ settings?: EditorToolsSettings.PrintSettings;
2564
+ }
2565
+
2566
+ /**
2567
+ * An object containing the content of ProseMirror packages used at the Editor component.
2568
+ *
2569
+ * "prosemirror-state",
2570
+ * "prosemirror-view",
2571
+ * "prosemirror-model",
2572
+ * "prosemirror-transform",
2573
+ * "prosemirror-commands",
2574
+ * "prosemirror-keymap",
2575
+ * "prosemirror-tables",
2576
+ * "prosemirror-schema-list",
2577
+ * "prosemirror-history",
2578
+ * "prosemirror-inputrules",
2579
+ * "prosemirror-dropcursor",
2580
+ * "prosemirror-gapcursor"
2581
+ */
2582
+ export declare const ProseMirror: {
2583
+ Selection: typeof Selection_2;
2584
+ SelectionRange: typeof SelectionRange;
2585
+ TextSelection: typeof TextSelection;
2586
+ NodeSelection: typeof NodeSelection;
2587
+ AllSelection: typeof AllSelection;
2588
+ EditorState: typeof EditorState;
2589
+ Plugin: typeof Plugin_2;
2590
+ PluginKey: typeof PluginKey;
2591
+ Transaction: typeof Transaction;
2592
+ Decoration: typeof Decoration;
2593
+ DecorationSet: typeof DecorationSet;
2594
+ EditorView: typeof EditorView;
2595
+ Node: typeof Node_2;
2596
+ ResolvedPos: typeof ResolvedPos;
2597
+ NodeRange: typeof NodeRange;
2598
+ Fragment: typeof Fragment;
2599
+ Slice: typeof Slice;
2600
+ ReplaceError: typeof ReplaceError;
2601
+ Mark: typeof Mark;
2602
+ Schema: typeof Schema;
2603
+ NodeType: typeof NodeType;
2604
+ MarkType: typeof MarkType;
2605
+ ContentMatch: typeof ContentMatch;
2606
+ DOMParser: typeof DOMParser_2;
2607
+ DOMSerializer: typeof DOMSerializer;
2608
+ Transform: typeof Transform;
2609
+ Step: typeof Step;
2610
+ StepResult: typeof StepResult;
2611
+ joinPoint: typeof joinPoint;
2612
+ canJoin: typeof canJoin;
2613
+ canSplit: typeof canSplit;
2614
+ insertPoint: typeof insertPoint;
2615
+ dropPoint: typeof dropPoint;
2616
+ liftTarget: typeof liftTarget;
2617
+ findWrapping: typeof findWrapping;
2618
+ StepMap: typeof StepMap;
2619
+ MapResult: typeof MapResult;
2620
+ Mapping: typeof Mapping;
2621
+ AddMarkStep: typeof AddMarkStep;
2622
+ RemoveMarkStep: typeof RemoveMarkStep;
2623
+ ReplaceStep: typeof ReplaceStep;
2624
+ ReplaceAroundStep: typeof ReplaceAroundStep;
2625
+ replaceStep: typeof replaceStep;
2626
+ deleteSelection: Command;
2627
+ joinBackward: Command;
2628
+ selectNodeBackward: Command;
2629
+ joinForward: Command;
2630
+ selectNodeForward: Command;
2631
+ joinUp: Command;
2632
+ joinDown: Command;
2633
+ lift: Command;
2634
+ newlineInCode: Command;
2635
+ exitCode: Command;
2636
+ createParagraphNear: Command;
2637
+ liftEmptyBlock: Command;
2638
+ splitBlock: Command;
2639
+ splitBlockKeepMarks: Command;
2640
+ selectParentNode: Command;
2641
+ selectAll: Command;
2642
+ wrapIn: typeof wrapIn;
2643
+ setBlockType: typeof setBlockType;
2644
+ toggleMark: typeof toggleMark;
2645
+ autoJoin: typeof autoJoin;
2646
+ chainCommands: typeof chainCommands;
2647
+ pcBaseKeymap: {
2648
+ [key: string]: Command;
2649
+ };
2650
+ macBaseKeymap: {
2651
+ [key: string]: Command;
2652
+ };
2653
+ baseKeymap: {
2654
+ [key: string]: Command;
2655
+ };
2656
+ history: typeof history_2;
2657
+ undo: Command;
2658
+ redo: Command;
2659
+ undoDepth: typeof undoDepth;
2660
+ redoDepth: typeof redoDepth;
2661
+ InputRule: typeof InputRule;
2662
+ inputRules: typeof inputRules;
2663
+ undoInputRule: Command;
2664
+ emDash: InputRule;
2665
+ ellipsis: InputRule;
2666
+ openDoubleQuote: InputRule;
2667
+ closeDoubleQuote: InputRule;
2668
+ openSingleQuote: InputRule;
2669
+ closeSingleQuote: InputRule;
2670
+ smartQuotes: readonly InputRule[];
2671
+ wrappingInputRule: typeof wrappingInputRule;
2672
+ textblockTypeInputRule: typeof textblockTypeInputRule;
2673
+ keymap: typeof keymap;
2674
+ keydownHandler: typeof keydownHandler;
2675
+ orderedList: NodeSpec;
2676
+ bulletList: NodeSpec;
2677
+ listItem: NodeSpec;
2678
+ addListNodes: typeof addListNodes;
2679
+ wrapInList: typeof wrapInList;
2680
+ splitListItem: typeof splitListItem;
2681
+ liftListItem: typeof liftListItem;
2682
+ sinkListItem: typeof sinkListItem;
2683
+ dropCursor: typeof dropCursor;
2684
+ gapCursor: typeof gapCursor;
2685
+ tableEditing: typeof tableEditing;
2686
+ fixTables: typeof fixTables;
2687
+ fixTablesKey: PluginKey<{
2688
+ fixTables: boolean;
2689
+ }>;
2690
+ cellAround: typeof cellAround;
2691
+ isInTable: typeof isInTable;
2692
+ selectionCell: typeof selectionCell;
2693
+ moveCellForward: typeof moveCellForward;
2694
+ inSameTable: typeof inSameTable;
2695
+ findCell: typeof findCell;
2696
+ colCount: typeof colCount;
2697
+ nextCell: typeof nextCell;
2698
+ removeColSpan: typeof removeColSpan;
2699
+ addColSpan: typeof addColSpan;
2700
+ columnIsHeader: typeof columnIsHeader;
2701
+ tableNodes: typeof tableNodes;
2702
+ tableNodeTypes: typeof tableNodeTypes;
2703
+ CellSelection: typeof CellSelection;
2704
+ TableMap: typeof TableMap;
2705
+ tableEditingKey: PluginKey<number>;
2706
+ columnResizing: typeof columnResizing;
2707
+ columnResizingPluginKey: PluginKey<ResizeState>;
2708
+ updateColumnsOnResize: typeof updateColumnsOnResize;
2709
+ selectedRect: typeof selectedRect;
2710
+ addColumn: typeof addColumn;
2711
+ addColumnBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
2712
+ addColumnAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
2713
+ deleteColumn: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
2714
+ rowIsHeader: typeof rowIsHeader;
2715
+ addRow: typeof addRow;
2716
+ addRowBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
2717
+ addRowAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
2718
+ deleteRow: typeof deleteRow;
2719
+ mergeCells: typeof mergeCells;
2720
+ splitCell: typeof splitCell;
2721
+ splitCellWithType: typeof splitCellWithType;
2722
+ setCellAttr: typeof setCellAttr;
2723
+ toggleHeader: typeof toggleHeader;
2724
+ toggleHeaderRow: Command;
2725
+ toggleHeaderColumn: Command;
2726
+ toggleHeaderCell: Command;
2727
+ goToNextCell: typeof goToNextCell;
2728
+ deleteTable: typeof deleteTable;
2729
+ };
2730
+
2731
+ /**
2732
+ * @hidden
2733
+ */
2734
+ declare interface SelectAllToolProps extends ToolProps {
2735
+ /**
2736
+ * The settings of the tool. Use it to modify the tool appearance.
2737
+ */
2738
+ settings?: EditorToolsSettings.SelectAllSettings;
2739
+ }
2740
+
2741
+ /**
2742
+ * @hidden
2743
+ */
2744
+ export declare interface Shortcuts {
2745
+ [key: string]: (state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView) => boolean;
2746
+ }
2747
+
2748
+ declare namespace shortcuts {
2749
+ export {
2750
+ Shortcuts,
2751
+ getShortcuts
2752
+ }
2753
+ }
2754
+
2755
+ /**
2756
+ * @hidden
2757
+ */
2758
+ declare interface TableCellPropertiesProps extends ToolProps {
2759
+ }
2760
+
2761
+ /**
2762
+ * @hidden
2763
+ */
2764
+ declare namespace TableEditNS {
2765
+ /**
2766
+ * @hidden
2767
+ */
2768
+ interface AddRowBeforeProps extends ToolProps {
2769
+ }
2770
+ /**
2771
+ * @hidden
2772
+ */
2773
+ interface AddRowAfterProps extends ToolProps {
2774
+ }
2775
+ /**
2776
+ * @hidden
2777
+ */
2778
+ interface AddColumnBeforeProps extends ToolProps {
2779
+ }
2780
+ /**
2781
+ * @hidden
2782
+ */
2783
+ interface AddColumnAfterProps extends ToolProps {
2784
+ }
2785
+ /**
2786
+ * @hidden
2787
+ */
2788
+ interface DeleteRowProps extends ToolProps {
2789
+ }
2790
+ /**
2791
+ * @hidden
2792
+ */
2793
+ interface DeleteColumnProps extends ToolProps {
2794
+ }
2795
+ /**
2796
+ * @hidden
2797
+ */
2798
+ interface DeleteTableProps extends ToolProps {
2799
+ }
2800
+ /**
2801
+ * @hidden
2802
+ */
2803
+ interface MergeCellsProps extends ToolProps {
2804
+ }
2805
+ /**
2806
+ * @hidden
2807
+ */
2808
+ interface SplitCellProps extends ToolProps {
2809
+ }
2810
+ /**
2811
+ * @hidden
2812
+ */
2813
+ const createAddRowBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps, any>;
2814
+ /**
2815
+ * @hidden
2816
+ */
2817
+ const createAddRowAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2818
+ /**
2819
+ * @hidden
2820
+ */
2821
+ const createAddColumnBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2822
+ /**
2823
+ * @hidden
2824
+ */
2825
+ const createAddColumnAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2826
+ /**
2827
+ * @hidden
2828
+ */
2829
+ const createDeleteRowTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2830
+ /**
2831
+ * @hidden
2832
+ */
2833
+ const createDeleteColumnTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2834
+ /**
2835
+ * @hidden
2836
+ */
2837
+ const createDeleteTableTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2838
+ /**
2839
+ * @hidden
2840
+ */
2841
+ const createMergeCellsTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2842
+ /**
2843
+ * @hidden
2844
+ */
2845
+ const createSplitCellTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
2846
+ }
2847
+
2848
+ /**
2849
+ * @hidden
2850
+ */
2851
+ declare interface TablePropertiesProps extends ToolProps {
2852
+ }
2853
+
2854
+ /**
2855
+ * @hidden
2856
+ */
2857
+ declare interface ToolProps extends BasicToolProps, ToolRenderProp, ButtonProps {
2858
+ }
2859
+
2860
+ /**
2861
+ * @hidden
2862
+ */
2863
+ declare interface ToolRenderProp {
2864
+ /**
2865
+ * Fires when a tool is about to be rendered. Used to override the default appearance of the tool.
2866
+ */
2867
+ render?: (tool: React.ReactElement<any>, args?: any) => React.ReactNode;
2868
+ }
2869
+
2870
+ /**
2871
+ * @hidden
2872
+ */
2873
+ declare interface ToolWithDialogRenderProp {
2874
+ /**
2875
+ * Fires when a tool is about to be rendered. Used to override the default appearance of the tool.
2876
+ */
2877
+ render?: (tool: [
2878
+ React.ReactElement<any>,
2879
+ React.ReactElement<any> | null
2880
+ ], args?: any) => React.ReactNode;
2881
+ }
2882
+
2883
+ /**
2884
+ * @hidden
2885
+ */
2886
+ declare namespace UnlinkToolNS {
2887
+ /**
2888
+ * @hidden
2889
+ */
2890
+ interface UnlinkProps extends ToolProps {
2891
+ }
2892
+ /**
2893
+ * @hidden
2894
+ */
2895
+ const createUnlinkTool: (settings: EditorToolsSettings.UnlinkSettings) => React_2.ComponentClass<UnlinkProps, any>;
2896
+ }
2897
+
2898
+ /**
2899
+ * @hidden
2900
+ */
2901
+ declare class ViewHtmlDialog extends React_2.Component<ViewHtmlDialogProps> {
2902
+ private htmlArea;
2903
+ /**
2904
+ * @hidden
2905
+ */
2906
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
2907
+ private textAreaRef;
2908
+ private onUpdate;
2909
+ private onClose;
2910
+ }
2911
+
2912
+ /**
2913
+ * @hidden
2914
+ */
2915
+ declare interface ViewHtmlDialogProps extends EditorDialogProps {
2916
+ /**
2917
+ * The `ViewHtmlSettings` object.
2918
+ */
2919
+ settings: EditorToolsSettings.ViewHtmlSettings;
2920
+ }
2921
+
2922
+ /**
2923
+ * @hidden
2924
+ */
2925
+ declare namespace ViewHtmlToolNS {
2926
+ /**
2927
+ * @hidden
2928
+ */
2929
+ interface ViewHtmlProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
2930
+ }
2931
+ /**
2932
+ * @hidden
2933
+ */
2934
+ interface ViewHtmlState {
2935
+ openedDialog: boolean;
2936
+ }
2937
+ /**
2938
+ * @hidden
2939
+ */
2940
+ const createViewHtmlTool: (settings: EditorToolsSettings.ViewHtmlSettings) => React_2.ComponentClass<ViewHtmlProps, ViewHtmlState>;
2941
+ }
2942
+
2943
+ export { }