@progress/kendo-react-editor 13.3.0 → 13.4.0-develop.2

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