@progress/kendo-react-editor 10.1.1-develop.1 → 10.2.0-develop.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor.js +1 -1
- package/Editor.mjs +9 -3
- package/dialogs/insertImage.js +1 -1
- package/dialogs/insertImage.mjs +15 -5
- package/dialogs/insertLink.js +1 -1
- package/dialogs/insertLink.mjs +9 -3
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/index.d.mts +165 -38
- package/index.d.ts +165 -38
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/tools/insertTable/tool.js +1 -1
- package/tools/insertTable/tool.mjs +3 -1
package/index.d.mts
CHANGED
|
@@ -52,7 +52,7 @@ import { inSameTable } from '@progress/kendo-editor-common';
|
|
|
52
52
|
import { insertPoint } from '@progress/kendo-editor-common';
|
|
53
53
|
import { isInTable } from '@progress/kendo-editor-common';
|
|
54
54
|
import { joinPoint } from '@progress/kendo-editor-common';
|
|
55
|
-
import { JSX
|
|
55
|
+
import { JSX } from 'react/jsx-runtime';
|
|
56
56
|
import { keydownHandler } from '@progress/kendo-editor-common';
|
|
57
57
|
import { keymap } from '@progress/kendo-editor-common';
|
|
58
58
|
import { liftListItem } from '@progress/kendo-editor-common';
|
|
@@ -241,7 +241,7 @@ export declare class Editor extends React_2.Component<EditorProps, EditorStateIn
|
|
|
241
241
|
/**
|
|
242
242
|
* @hidden
|
|
243
243
|
*/
|
|
244
|
-
render():
|
|
244
|
+
render(): JSX.Element;
|
|
245
245
|
private renderDialog;
|
|
246
246
|
private renderTool;
|
|
247
247
|
private updateTools;
|
|
@@ -447,97 +447,224 @@ export declare interface EditorPasteEvent extends EditorEvent {
|
|
|
447
447
|
*/
|
|
448
448
|
export declare interface EditorProps {
|
|
449
449
|
/**
|
|
450
|
-
* Sets the default HTML content of the Editor.
|
|
450
|
+
* Sets the default HTML content of the Editor. This content is rendered
|
|
451
|
+
* when the Editor is initialized and no value is provided.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```jsx
|
|
455
|
+
* <Editor defaultContent="<p>Hello, World!</p>" />
|
|
456
|
+
* ```
|
|
451
457
|
*/
|
|
452
458
|
defaultContent?: string;
|
|
453
459
|
/**
|
|
454
460
|
* Sets the initial edit mode of the Editor. Defaults to `iframe`.
|
|
461
|
+
* - `iframe`: The Editor content is rendered inside an `<iframe>`.
|
|
462
|
+
* - `div`: The Editor content is rendered inside a `<div>` element.
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```jsx
|
|
466
|
+
* <Editor defaultEditMode="div" />
|
|
467
|
+
* ```
|
|
455
468
|
*/
|
|
456
469
|
defaultEditMode?: 'iframe' | 'div';
|
|
457
470
|
/**
|
|
458
|
-
*
|
|
471
|
+
* Applies custom styles to the content element wrapper of the Editor.
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* ```jsx
|
|
475
|
+
* <Editor contentStyle={{ backgroundColor: "lightgray" }} />
|
|
476
|
+
* ```
|
|
459
477
|
*/
|
|
460
478
|
contentStyle?: React.CSSProperties;
|
|
461
479
|
/**
|
|
462
|
-
*
|
|
480
|
+
* Specifies the text directionality of the Editor content.
|
|
481
|
+
* Accepts `ltr` (left-to-right) or `rtl` (right-to-left).
|
|
482
|
+
*
|
|
483
|
+
* @example
|
|
484
|
+
* ```jsx
|
|
485
|
+
* <Editor dir="rtl" />
|
|
486
|
+
* ```
|
|
463
487
|
*/
|
|
464
488
|
dir?: string;
|
|
465
489
|
/**
|
|
466
|
-
*
|
|
490
|
+
* Adds custom CSS classes to the Editor's root element.
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* ```jsx
|
|
494
|
+
* <Editor className="custom-editor-class" />
|
|
495
|
+
* ```
|
|
467
496
|
*/
|
|
468
497
|
className?: string;
|
|
469
498
|
/**
|
|
470
|
-
*
|
|
499
|
+
* Applies custom styles to the Editor's root element.
|
|
500
|
+
*
|
|
501
|
+
* @example
|
|
502
|
+
* ```jsx
|
|
503
|
+
* <Editor style={{ border: "1px solid black" }} />
|
|
504
|
+
* ```
|
|
471
505
|
*/
|
|
472
506
|
style?: React.CSSProperties;
|
|
473
507
|
/**
|
|
474
|
-
* Identifies the element(s)
|
|
508
|
+
* Identifies the element(s) that describe the Editor component.
|
|
509
|
+
* Similar to the [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* ```jsx
|
|
513
|
+
* <Editor ariaDescribedBy="description-element-id" />
|
|
514
|
+
* ```
|
|
475
515
|
*/
|
|
476
516
|
ariaDescribedBy?: string;
|
|
477
517
|
/**
|
|
478
|
-
* Identifies the element(s)
|
|
518
|
+
* Identifies the element(s) that label the Editor component.
|
|
519
|
+
*
|
|
520
|
+
* @example
|
|
521
|
+
* ```jsx
|
|
522
|
+
* <Editor ariaLabelledBy="label-element-id" />
|
|
523
|
+
* ```
|
|
479
524
|
*/
|
|
480
525
|
ariaLabelledBy?: string;
|
|
481
526
|
/**
|
|
482
|
-
*
|
|
527
|
+
* Provides an accessible label for the Editor component.
|
|
528
|
+
* Similar to the [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute.
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* ```jsx
|
|
532
|
+
* <Editor ariaLabel="Rich Text Editor" />
|
|
533
|
+
* ```
|
|
483
534
|
*/
|
|
484
535
|
ariaLabel?: string;
|
|
485
536
|
/**
|
|
486
|
-
*
|
|
537
|
+
* Enables or disables resizing of the Editor. Defaults to `false`.
|
|
538
|
+
*
|
|
539
|
+
* @example
|
|
540
|
+
* ```jsx
|
|
541
|
+
* <Editor resizable={true} />
|
|
542
|
+
* ```
|
|
487
543
|
*/
|
|
488
544
|
resizable?: boolean;
|
|
489
545
|
/**
|
|
490
|
-
*
|
|
546
|
+
* Configures the tools available in the Editor's toolbar.
|
|
547
|
+
* By default, no tools are rendered.
|
|
548
|
+
*
|
|
549
|
+
* @example
|
|
550
|
+
* ```jsx
|
|
551
|
+
* <Editor tools={[{ name: "bold" }, { name: "italic" }]} />
|
|
552
|
+
* ```
|
|
491
553
|
*/
|
|
492
554
|
tools?: Array<any>;
|
|
493
555
|
/**
|
|
494
|
-
*
|
|
495
|
-
* Useful for configuring the `EditorView` object.
|
|
556
|
+
* Triggered when the Editor is about to mount. Useful for configuring the `EditorView` object.
|
|
496
557
|
* To initialize `EditorView`, use the properties of the `event` object.
|
|
558
|
+
*
|
|
559
|
+
* @param event - The event object containing initialization details.
|
|
560
|
+
* @returns An `EditorView` instance or `void`.
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
* ```jsx
|
|
564
|
+
* <Editor onMount={(event) => console.log(event.dom)} />
|
|
565
|
+
* ```
|
|
497
566
|
*/
|
|
498
567
|
onMount?: (event: EditorMountEvent) => EditorView | void;
|
|
499
568
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
569
|
+
* Triggered when content is pasted into the Editor. Allows modification of the pasted content.
|
|
570
|
+
*
|
|
571
|
+
* @param event - The event object containing the pasted content details.
|
|
572
|
+
*
|
|
573
|
+
* @returns The modified HTML string or `void`.
|
|
574
|
+
*
|
|
575
|
+
* @example
|
|
576
|
+
* ```jsx
|
|
577
|
+
* <Editor onPasteHtml={(event) => event.pastedHtml.toUpperCase()} />
|
|
578
|
+
* ```
|
|
502
579
|
*/
|
|
503
580
|
onPasteHtml?: (event: EditorPasteEvent) => string | void;
|
|
504
581
|
/**
|
|
505
|
-
*
|
|
582
|
+
* Triggered when the Editor is about to apply a transaction.
|
|
506
583
|
* To prevent the transaction, return `false`.
|
|
584
|
+
*
|
|
585
|
+
* @param event - The event object containing transaction details.
|
|
586
|
+
* @returns `false` to cancel the transaction or `void`.
|
|
587
|
+
*
|
|
588
|
+
* @example
|
|
589
|
+
* ```jsx
|
|
590
|
+
* <Editor onExecute={(event) => event.transaction.steps.length > 0} />
|
|
591
|
+
* ```
|
|
507
592
|
*/
|
|
508
593
|
onExecute?: (event: EditorExecuteEvent) => boolean | void;
|
|
509
594
|
/**
|
|
510
|
-
*
|
|
595
|
+
* Triggered when the Editor's content element receives focus.
|
|
596
|
+
*
|
|
597
|
+
* @param event - The event object containing focus details.
|
|
598
|
+
*
|
|
599
|
+
* @example
|
|
600
|
+
* ```jsx
|
|
601
|
+
* <Editor onFocus={(event) => console.log("Editor focused")} />
|
|
602
|
+
* ```
|
|
511
603
|
*/
|
|
512
604
|
onFocus?: (event: EditorFocusEvent) => void;
|
|
513
605
|
/**
|
|
514
|
-
*
|
|
606
|
+
* Triggered when the Editor's content element loses focus.
|
|
607
|
+
*
|
|
608
|
+
* @param event - The event object containing blur details.
|
|
609
|
+
*
|
|
610
|
+
* @example
|
|
611
|
+
* ```jsx
|
|
612
|
+
* <Editor onBlur={(event) => console.log("Editor blurred")} />
|
|
613
|
+
* ```
|
|
515
614
|
*/
|
|
516
615
|
onBlur?: (event: EditorBlurEvent) => void;
|
|
517
616
|
/**
|
|
518
|
-
*
|
|
617
|
+
* Triggered when the value of the Editor is about to change.
|
|
618
|
+
*
|
|
619
|
+
* @param event - The event object containing change details.
|
|
620
|
+
*
|
|
621
|
+
* @example
|
|
622
|
+
* ```jsx
|
|
623
|
+
* <Editor onChange={(event) => console.log(event.value)} />
|
|
624
|
+
* ```
|
|
519
625
|
*/
|
|
520
626
|
onChange?: (event: EditorChangeEvent) => void;
|
|
521
627
|
/**
|
|
522
|
-
*
|
|
523
|
-
*
|
|
628
|
+
* Triggered during the initialization of an Editor with the `iframe` property set to `true`.
|
|
629
|
+
* Allows access to the iframe document for customization.
|
|
630
|
+
*
|
|
631
|
+
* @param event - The event object containing iframe details.
|
|
632
|
+
*
|
|
633
|
+
* @example
|
|
634
|
+
* ```jsx
|
|
635
|
+
* <Editor onIFrameInit={(event) => { event.iframe.style.border = "none"; }} />
|
|
636
|
+
* ```
|
|
524
637
|
*/
|
|
525
638
|
onIFrameInit?: (event: EditorIFrameInitEvent) => void;
|
|
526
639
|
/**
|
|
527
|
-
*
|
|
640
|
+
* Specifies the value of the Editor. Can be a ProseMirror `Node` or an HTML string.
|
|
641
|
+
*
|
|
642
|
+
* @example
|
|
643
|
+
* ```jsx
|
|
644
|
+
* <Editor value="<p>Initial content</p>" />
|
|
645
|
+
* ```
|
|
528
646
|
*/
|
|
529
647
|
value?: Node_2 | string;
|
|
530
648
|
/**
|
|
531
|
-
*
|
|
649
|
+
* Disables the built-in keyboard navigation of the Editor's toolbar when set to `false`.
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* ```jsx
|
|
653
|
+
* <Editor keyboardNavigation={false} />
|
|
654
|
+
* ```
|
|
532
655
|
*/
|
|
533
656
|
keyboardNavigation?: boolean;
|
|
534
657
|
/**
|
|
535
|
-
* Defines
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* `full
|
|
539
|
-
*
|
|
658
|
+
* Defines options for parsing HTML content:
|
|
659
|
+
* - `false`: Collapses whitespace as per HTML rules.
|
|
660
|
+
* - `true`: Preserves whitespace but normalizes newlines to spaces.
|
|
661
|
+
* - `full`: Fully preserves whitespace.
|
|
540
662
|
* Defaults to `full`.
|
|
663
|
+
*
|
|
664
|
+
* @example
|
|
665
|
+
* ```jsx
|
|
666
|
+
* <Editor preserveWhitespace="full" />
|
|
667
|
+
* ```
|
|
541
668
|
*/
|
|
542
669
|
preserveWhitespace?: boolean | 'full';
|
|
543
670
|
}
|
|
@@ -925,12 +1052,12 @@ export declare namespace EditorTools {
|
|
|
925
1052
|
* The BulletedList tool component.
|
|
926
1053
|
* Will render a SplitButton which applies `<ol>` HTML element with predefined styles - disc and square.
|
|
927
1054
|
*/
|
|
928
|
-
const BulletedList: (props: any) =>
|
|
1055
|
+
const BulletedList: (props: any) => JSX.Element;
|
|
929
1056
|
/**
|
|
930
1057
|
* The NumberedList tool component.
|
|
931
1058
|
* Will render a SplitButton which applies `<ul>` HTML element with predefined styles - upper-roman, lower-roman, upper-latin and lower-latin.
|
|
932
1059
|
*/
|
|
933
|
-
const NumberedList: (props: any) =>
|
|
1060
|
+
const NumberedList: (props: any) => JSX.Element;
|
|
934
1061
|
/**
|
|
935
1062
|
* The TableCellProperties tool component.
|
|
936
1063
|
*/
|
|
@@ -988,7 +1115,7 @@ export declare namespace EditorTools {
|
|
|
988
1115
|
* To modify the default PDF export options, see the following example:
|
|
989
1116
|
*
|
|
990
1117
|
* @example
|
|
991
|
-
* ```
|
|
1118
|
+
* ```jsx-no-run
|
|
992
1119
|
* import { Editor, EditorTools } from '@progress/kendo-react-editor';
|
|
993
1120
|
* const { Bold, Italic, Pdf } = EditorTools;
|
|
994
1121
|
*
|
|
@@ -2099,7 +2226,7 @@ declare class FindAndReplace extends React_2.Component<FindAndReplaceProps, Find
|
|
|
2099
2226
|
/**
|
|
2100
2227
|
* @hidden
|
|
2101
2228
|
*/
|
|
2102
|
-
render(): (false |
|
|
2229
|
+
render(): (false | JSX.Element | undefined)[];
|
|
2103
2230
|
private onClose;
|
|
2104
2231
|
private onOpen;
|
|
2105
2232
|
}
|
|
@@ -2121,7 +2248,7 @@ declare class FindAndReplaceDialog extends React_2.Component<FindAndReplaceDialo
|
|
|
2121
2248
|
/**
|
|
2122
2249
|
* @hidden
|
|
2123
2250
|
*/
|
|
2124
|
-
render():
|
|
2251
|
+
render(): JSX.Element;
|
|
2125
2252
|
private onTabSelect;
|
|
2126
2253
|
private onClose;
|
|
2127
2254
|
private matchesMessage;
|
|
@@ -2337,7 +2464,7 @@ declare class InsertImageDialog extends React_2.Component<InsertImageDialogProps
|
|
|
2337
2464
|
/**
|
|
2338
2465
|
* @hidden
|
|
2339
2466
|
*/
|
|
2340
|
-
render(): string | number | boolean | Iterable<React_2.ReactNode> |
|
|
2467
|
+
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;
|
|
2341
2468
|
private onClose;
|
|
2342
2469
|
private onInsert;
|
|
2343
2470
|
}
|
|
@@ -2362,7 +2489,7 @@ declare class InsertLinkDialog extends React_2.Component<InsertLinkDialogProps>
|
|
|
2362
2489
|
/**
|
|
2363
2490
|
* @hidden
|
|
2364
2491
|
*/
|
|
2365
|
-
render(): string | number | boolean | Iterable<React_2.ReactNode> |
|
|
2492
|
+
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;
|
|
2366
2493
|
private onClose;
|
|
2367
2494
|
private onInsert;
|
|
2368
2495
|
}
|
|
@@ -2463,7 +2590,7 @@ declare namespace InsertTablePopupNS {
|
|
|
2463
2590
|
/**
|
|
2464
2591
|
* @hidden
|
|
2465
2592
|
*/
|
|
2466
|
-
render():
|
|
2593
|
+
render(): JSX.Element;
|
|
2467
2594
|
private onWindowDown;
|
|
2468
2595
|
private onPointerDown;
|
|
2469
2596
|
}
|
|
@@ -2917,7 +3044,7 @@ declare class ViewHtmlDialog extends React_2.Component<ViewHtmlDialogProps> {
|
|
|
2917
3044
|
/**
|
|
2918
3045
|
* @hidden
|
|
2919
3046
|
*/
|
|
2920
|
-
render(): string | number | boolean | Iterable<React_2.ReactNode> |
|
|
3047
|
+
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;
|
|
2921
3048
|
private textAreaRef;
|
|
2922
3049
|
private onUpdate;
|
|
2923
3050
|
private onClose;
|