@progress/kendo-angular-editor 19.1.2-develop.2 → 19.1.2-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/apply-to-word-options.d.ts +12 -6
- package/common/commands.d.ts +7 -6
- package/common/css-settings.interface.d.ts +13 -4
- package/common/font-family-item.interface.d.ts +11 -3
- package/common/font-size-item.interface.d.ts +11 -3
- package/common/format-item.interface.d.ts +11 -3
- package/common/paste-cleanup-settings.d.ts +29 -24
- package/common/plugins-function.d.ts +7 -6
- package/common/resizable-options.interface.d.ts +15 -5
- package/directives.d.ts +1 -1
- package/editor.component.d.ts +36 -27
- package/editor.module.d.ts +5 -4
- package/esm2022/common/error-messages.mjs +1 -1
- package/esm2022/directives.mjs +1 -1
- package/esm2022/editor.component.mjs +36 -27
- package/esm2022/editor.module.mjs +5 -4
- package/esm2022/localization/custom-messages.component.mjs +10 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/preventable-events/paste-event.mjs +4 -4
- package/esm2022/tools/alignment/editor-align-center-button.directive.mjs +3 -3
- package/esm2022/tools/alignment/editor-align-justify-button.directive.mjs +3 -3
- package/esm2022/tools/alignment/editor-align-left-button.directive.mjs +3 -3
- package/esm2022/tools/alignment/editor-align-right-button.directive.mjs +3 -3
- package/esm2022/tools/blockquote/editor-blockquote-button.directive.mjs +2 -3
- package/esm2022/tools/colorpicker/editor-back-color.directive.mjs +3 -4
- package/esm2022/tools/colorpicker/editor-colorpicker.component.mjs +20 -10
- package/esm2022/tools/colorpicker/editor-fore-color.directive.mjs +3 -4
- package/esm2022/tools/editor-clean-formatting-button.directive.mjs +3 -3
- package/esm2022/tools/fontfamily/editor-fontfamily.component.mjs +4 -5
- package/esm2022/tools/fontsize/editor-fontsize.component.mjs +6 -6
- package/esm2022/tools/format/editor-format.component.mjs +6 -6
- package/esm2022/tools/history/editor-redo-button.directive.mjs +3 -3
- package/esm2022/tools/history/editor-undo-button.directive.mjs +3 -3
- package/esm2022/tools/image/editor-insert-image-button.directive.mjs +2 -2
- package/esm2022/tools/indentation/editor-indent-button.directive.mjs +3 -4
- package/esm2022/tools/indentation/editor-outdent-button.directive.mjs +3 -4
- package/esm2022/tools/link/editor-create-link-button.directive.mjs +3 -4
- package/esm2022/tools/link/editor-insert-file-button.directive.mjs +2 -3
- package/esm2022/tools/link/editor-unlink-button.directive.mjs +3 -4
- package/esm2022/tools/list/editor-insert-ordered-list-button.directive.mjs +3 -4
- package/esm2022/tools/list/editor-insert-unordered-list-button.directive.mjs +3 -3
- package/esm2022/tools/print/editor-print-button.directive.mjs +3 -3
- package/esm2022/tools/select-all/select-all-button.directive.mjs +2 -2
- package/esm2022/tools/source/editor-view-source-button.directive.mjs +2 -2
- package/esm2022/tools/tables/editor-add-column-after-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-add-column-before-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-add-row-after-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-add-row-before-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-delete-column-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-delete-row-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-delete-table-button.directive.mjs +3 -3
- package/esm2022/tools/tables/editor-insert-table-button.component.mjs +3 -1
- package/esm2022/tools/tables/editor-merge-cells-button.directive.mjs +4 -4
- package/esm2022/tools/tables/editor-split-cell-button.directive.mjs +4 -4
- package/esm2022/tools/typographical-emphasis/editor-bold-button.directive.mjs +3 -3
- package/esm2022/tools/typographical-emphasis/editor-italic-button.directive.mjs +3 -3
- package/esm2022/tools/typographical-emphasis/editor-strikethrough-button.directive.mjs +3 -3
- package/esm2022/tools/typographical-emphasis/editor-subscript-button.directive.mjs +3 -3
- package/esm2022/tools/typographical-emphasis/editor-superscript-button.directive.mjs +3 -3
- package/esm2022/tools/typographical-emphasis/editor-underline-button.directive.mjs +3 -3
- package/esm2022/util.mjs +7 -6
- package/fesm2022/progress-kendo-angular-editor.mjs +210 -188
- package/localization/custom-messages.component.d.ts +10 -1
- package/package.json +15 -15
- package/preventable-events/paste-event.d.ts +4 -4
- package/schematics/ngAdd/index.js +4 -4
- package/tools/alignment/editor-align-center-button.directive.d.ts +3 -3
- package/tools/alignment/editor-align-justify-button.directive.d.ts +3 -3
- package/tools/alignment/editor-align-left-button.directive.d.ts +3 -3
- package/tools/alignment/editor-align-right-button.directive.d.ts +3 -3
- package/tools/blockquote/editor-blockquote-button.directive.d.ts +2 -3
- package/tools/colorpicker/editor-back-color.directive.d.ts +3 -4
- package/tools/colorpicker/editor-colorpicker.component.d.ts +20 -10
- package/tools/colorpicker/editor-fore-color.directive.d.ts +3 -4
- package/tools/editor-clean-formatting-button.directive.d.ts +3 -3
- package/tools/fontfamily/editor-fontfamily.component.d.ts +4 -5
- package/tools/fontsize/editor-fontsize.component.d.ts +6 -6
- package/tools/format/editor-format.component.d.ts +6 -6
- package/tools/history/editor-redo-button.directive.d.ts +3 -3
- package/tools/history/editor-undo-button.directive.d.ts +3 -3
- package/tools/image/editor-insert-image-button.directive.d.ts +2 -2
- package/tools/indentation/editor-indent-button.directive.d.ts +3 -4
- package/tools/indentation/editor-outdent-button.directive.d.ts +3 -4
- package/tools/link/editor-create-link-button.directive.d.ts +3 -4
- package/tools/link/editor-insert-file-button.directive.d.ts +2 -3
- package/tools/link/editor-unlink-button.directive.d.ts +3 -4
- package/tools/list/editor-insert-ordered-list-button.directive.d.ts +3 -4
- package/tools/list/editor-insert-unordered-list-button.directive.d.ts +3 -3
- package/tools/print/editor-print-button.directive.d.ts +3 -3
- package/tools/select-all/select-all-button.directive.d.ts +2 -2
- package/tools/source/editor-view-source-button.directive.d.ts +2 -2
- package/tools/tables/editor-add-column-after-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-column-before-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-row-after-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-row-before-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-column-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-row-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-table-button.directive.d.ts +3 -3
- package/tools/tables/editor-insert-table-button.component.d.ts +3 -1
- package/tools/tables/editor-merge-cells-button.directive.d.ts +4 -4
- package/tools/tables/editor-split-cell-button.directive.d.ts +4 -4
- package/tools/typographical-emphasis/editor-bold-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-italic-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-strikethrough-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-subscript-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-superscript-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-underline-button.directive.d.ts +3 -3
- package/util.d.ts +7 -6
|
@@ -3,18 +3,24 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Represents the options for applying a command to the "word" at the cursor position.
|
|
7
|
+
* Use the `before` and `after` regular expressions to define what counts as a word boundary ([see example]({% slug toolbartools_editor %}#toc-customizing-word-delimiters)).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const options: ApplyToWordOptions = {
|
|
12
|
+
* before: /\s/,
|
|
13
|
+
* after: /\s/
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
export interface ApplyToWordOptions {
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
19
|
+
* Defines the regular expression for the start boundary of the word before the cursor.
|
|
14
20
|
*/
|
|
15
21
|
before: RegExp;
|
|
16
22
|
/**
|
|
17
|
-
*
|
|
23
|
+
* Defines the regular expression for the end boundary of the word after the cursor.
|
|
18
24
|
*/
|
|
19
25
|
after: RegExp;
|
|
20
26
|
}
|
package/common/commands.d.ts
CHANGED
|
@@ -16,24 +16,25 @@ export type Command = (state: EditorState, dispatch: DispatchFn, view?: EditorVi
|
|
|
16
16
|
*/
|
|
17
17
|
export type EditorInternalCommand = 'print';
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Lists the command names accepted by the `exec` method.
|
|
20
20
|
*/
|
|
21
21
|
export type EditorCommand = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'createLink' | 'unlink' | 'insertFile' | 'insertImage' | 'insertOrderedList' | 'insertUnorderedList' | 'insertText' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'format' | 'fontFamily' | 'fontSize' | 'cleanFormat' | 'setHTML' | 'undo' | 'redo' | 'subscript' | 'superscript' | 'cleanFormatting' | 'foreColor' | 'backColor' | 'insertTable' | 'addColumnBefore' | 'addColumnAfter' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'deleteColumn' | 'mergeCells' | 'splitCell' | 'deleteTable' | 'selectAll' | 'blockquote';
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Lists the dialog commands accepted by the `openDialog` method.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* Supported dialog commands:
|
|
26
26
|
* - `createLink`
|
|
27
27
|
* - `viewSource`
|
|
28
28
|
* - `insertFile`
|
|
29
29
|
* - `insertImage`
|
|
30
30
|
* - `tableWizard`
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* // Open a `createLink` dialog.
|
|
34
35
|
* editor.openDialog('createLink');
|
|
35
36
|
*
|
|
36
|
-
* //
|
|
37
|
+
* // Open a `viewSource` dialog.
|
|
37
38
|
* editor.openDialog('viewSource');
|
|
38
39
|
* ```
|
|
39
40
|
*/
|
|
@@ -3,19 +3,28 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the settings for applying custom CSS styles to the Editor in iframe mode ([see example](slug:styling_editor#toc-encapsulated-mode)).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const cssSettings: EditorCssSettings = {
|
|
11
|
+
* content: '.k-editor { color: red; }',
|
|
12
|
+
* path: '/styles/editor.css',
|
|
13
|
+
* keepBuiltInCss: false
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
7
16
|
*/
|
|
8
17
|
export interface EditorCssSettings {
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* Sets the CSS rules to apply.
|
|
11
20
|
*/
|
|
12
21
|
content?: string;
|
|
13
22
|
/**
|
|
14
|
-
*
|
|
23
|
+
* Sets the path to an external style sheet.
|
|
15
24
|
*/
|
|
16
25
|
path?: string;
|
|
17
26
|
/**
|
|
18
|
-
*
|
|
27
|
+
* Determines if custom styles override or extend built-in styles.
|
|
19
28
|
*/
|
|
20
29
|
keepBuiltInCss?: boolean;
|
|
21
30
|
}
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
* Represents
|
|
6
|
+
* Represents a single font in the font family DropDownList.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const fontItem: FontFamilyItem = {
|
|
11
|
+
* fontName: 'Arial, Helvetica, sans-serif',
|
|
12
|
+
* text: 'Arial'
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
7
15
|
*/
|
|
8
16
|
export interface FontFamilyItem {
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
18
|
+
* Sets the value of the [`font-family`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) CSS property.
|
|
11
19
|
*/
|
|
12
20
|
fontName: string;
|
|
13
21
|
/**
|
|
14
|
-
*
|
|
22
|
+
* Sets the display text for the font in the DropDownList.
|
|
15
23
|
*/
|
|
16
24
|
text: string;
|
|
17
25
|
}
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
* Represents
|
|
6
|
+
* Represents a single item in the font size DropDownList.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const fontSizeItem: FontSizeItem = {
|
|
11
|
+
* size: 14,
|
|
12
|
+
* text: '14px'
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
7
15
|
*/
|
|
8
16
|
export interface FontSizeItem {
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
18
|
+
* Sets the value of the [`font-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) CSS property.
|
|
11
19
|
*/
|
|
12
20
|
size: number | string;
|
|
13
21
|
/**
|
|
14
|
-
*
|
|
22
|
+
* Sets the display text for the font size in the DropDownList.
|
|
15
23
|
*/
|
|
16
24
|
text: string;
|
|
17
25
|
}
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
* Represents
|
|
6
|
+
* Represents a single item in the formatting DropDownList.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const formatItem: FormatItem = {
|
|
11
|
+
* tag: 'h1',
|
|
12
|
+
* text: 'Heading 1'
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
7
15
|
*/
|
|
8
16
|
export interface FormatItem {
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
18
|
+
* Sets the tag to apply.
|
|
11
19
|
*/
|
|
12
20
|
tag: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
13
21
|
/**
|
|
14
|
-
*
|
|
22
|
+
* Sets the display text for the tag in the DropDownList.
|
|
15
23
|
*/
|
|
16
24
|
text: string;
|
|
17
25
|
}
|
|
@@ -3,57 +3,62 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the configuration options for Paste Cleanup ([see example]({% slug paste_cleanup %})).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const settings: PasteCleanupSettings = {
|
|
11
|
+
* convertMsLists: true,
|
|
12
|
+
* removeHtmlComments: true,
|
|
13
|
+
* stripTags: ['span'],
|
|
14
|
+
* removeAttributes: ['lang'],
|
|
15
|
+
* removeMsClasses: true,
|
|
16
|
+
* removeMsStyles: true,
|
|
17
|
+
* removeInvalidHTML: true
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
7
20
|
*/
|
|
8
21
|
export interface PasteCleanupSettings {
|
|
9
22
|
/**
|
|
10
|
-
*
|
|
23
|
+
* Converts MS Word lists to HTML lists when set to `true`.
|
|
11
24
|
*/
|
|
12
25
|
convertMsLists?: boolean;
|
|
13
26
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* For example `<!-- comment --> <p> content </p>` will result in `<p> content </p>`
|
|
27
|
+
* Removes HTML comments when set to `true`.
|
|
17
28
|
*
|
|
29
|
+
* For example, `<!-- comment --> <p> content </p>` becomes `<p> content </p>`.
|
|
18
30
|
*/
|
|
19
31
|
removeHtmlComments?: boolean;
|
|
20
32
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* For example when `stripTags: ['span']`, `<p><span lang=EN-US>content</span></p>` will result in `<p>content</p>`
|
|
33
|
+
* Removes the specified tags from the HTML.
|
|
24
34
|
*
|
|
35
|
+
* For example, with `stripTags: ['span']`, `<p><span lang=EN-US>content</span></p>` becomes `<p>content</p>`.
|
|
25
36
|
*/
|
|
26
37
|
stripTags?: string[];
|
|
27
38
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* For example when `removeAttributes: ['lang']`, `<p><span lang=EN-US>content</span></p>`
|
|
33
|
-
* will result in `<p><span>content</span></p>`
|
|
39
|
+
* Removes the specified DOM attributes from the HTML.
|
|
40
|
+
* Set to `'all'` to remove every attribute.
|
|
41
|
+
* Set to an array to remove specific attributes.
|
|
34
42
|
*
|
|
43
|
+
* For example, with `removeAttributes: ['lang']`, `<p><span lang=EN-US>content</span></p>` becomes `<p><span>content</span></p>`.
|
|
35
44
|
*/
|
|
36
45
|
removeAttributes?: string[] | 'all';
|
|
37
46
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* For example `<p class="MsoNormal">pasted from MS Word</p>` will result in `<p>pasted from MS Word</p>`
|
|
47
|
+
* Removes class attributes starting with 'Mso' when set to `true`.
|
|
41
48
|
*
|
|
49
|
+
* For example, `<p class="MsoNormal">pasted from MS Word</p>` becomes `<p>pasted from MS Word</p>`.
|
|
42
50
|
*/
|
|
43
51
|
removeMsClasses?: boolean;
|
|
44
52
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* For example `<p><span style="color:#7C7C7C; mso-themecolor:accent3; mso-themeshade:191;">content</span></p>`
|
|
48
|
-
* will result in `<p><span style="color: #7C7C7C; background: silver;">content</span></p>`
|
|
53
|
+
* Removes style attributes starting with 'Mso' when set to `true`.
|
|
49
54
|
*
|
|
55
|
+
* For example, `<p><span style="color:#7C7C7C; mso-themecolor:accent3; mso-themeshade:191;">content</span></p>` becomes `<p><span style="color: #7C7C7C; background: silver;">content</span></p>`.
|
|
50
56
|
*/
|
|
51
57
|
removeMsStyles?: boolean;
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* For example `<p>content <o:p>, <w:sdtPr></p>` will result in `<p>content </p>`
|
|
59
|
+
* Removes invalid HTML when set to `true`.
|
|
56
60
|
*
|
|
61
|
+
* For example, `<p>content <o:p>, <w:sdtPr></p>` becomes `<p>content </p>`.
|
|
57
62
|
*/
|
|
58
63
|
removeInvalidHTML?: boolean;
|
|
59
64
|
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Plugin } from '@progress/kendo-editor-common';
|
|
6
6
|
/**
|
|
7
|
-
* Represents the callback
|
|
7
|
+
* Represents the callback used by the
|
|
8
8
|
* [`plugins`]({% slug api_editor_editorcomponent %}#toc-plugins) property.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* pluginsCallback(defaultPlugins: Plugin[]): Plugin[] {
|
|
13
|
+
* const myPlugin = new Plugin({/ custom plugin code /});
|
|
14
|
+
* return [...defaultPlugins, myPlugin];
|
|
15
|
+
* }
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
18
|
export type PluginsFn = (args: Plugin[]) => Plugin[];
|
|
@@ -3,23 +3,33 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the size restrictions for the resizable Editor ([see example](slug:resizing_editor#toc-resizing-the-editor)).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const options: EditorResizableOptions = {
|
|
11
|
+
* minWidth: 200,
|
|
12
|
+
* minHeight: 100,
|
|
13
|
+
* maxWidth: 800,
|
|
14
|
+
* maxHeight: 600
|
|
15
|
+
* };
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
export interface EditorResizableOptions {
|
|
9
19
|
/**
|
|
10
|
-
*
|
|
20
|
+
* Sets the minimum width of the resizable Editor in pixels.
|
|
11
21
|
*/
|
|
12
22
|
minWidth?: number;
|
|
13
23
|
/**
|
|
14
|
-
*
|
|
24
|
+
* Sets the minimum height of the resizable Editor in pixels.
|
|
15
25
|
*/
|
|
16
26
|
minHeight?: number;
|
|
17
27
|
/**
|
|
18
|
-
*
|
|
28
|
+
* Sets the maximum width of the resizable Editor in pixels.
|
|
19
29
|
*/
|
|
20
30
|
maxWidth?: number;
|
|
21
31
|
/**
|
|
22
|
-
*
|
|
32
|
+
* Sets the maximum height of the resizable Editor in pixels.
|
|
23
33
|
*/
|
|
24
34
|
maxHeight?: number;
|
|
25
35
|
}
|
package/directives.d.ts
CHANGED
|
@@ -46,6 +46,6 @@ import { EditorSelectAllButtonDirective } from './tools/select-all/select-all-bu
|
|
|
46
46
|
import { EditorSplitCellButtonDirective } from './tools/tables/editor-split-cell-button.directive';
|
|
47
47
|
import { EditorMergeCellsButtonDirective } from './tools/tables/editor-merge-cells-button.directive';
|
|
48
48
|
/**
|
|
49
|
-
* Utility array that contains all `Editor` related components and directives
|
|
49
|
+
* Utility array that contains all `Editor` related components and directives.
|
|
50
50
|
*/
|
|
51
51
|
export declare const KENDO_EDITOR: readonly [typeof EditorComponent, typeof EditorAlignLeftButtonDirective, typeof EditorAlignCenterButtonDirective, typeof EditorAlignRightButtonDirective, typeof EditorAlignJustifyButtonDirective, typeof EditorInsertFileButtonDirective, typeof EditorRedoButtonDirective, typeof EditorUndoButtonDirective, typeof EditorInsertImageButtonDirective, typeof EditorIndentButtonDirective, typeof EditorOutdentButtonDirective, typeof EditorCreateLinkButtonDirective, typeof EditorUnlinkButtonDirective, typeof EditorInsertOrderedListButtonDirective, typeof EditorInsertUnorderedListButtonDirective, typeof EditorViewSourceButtonDirective, typeof EditorBoldButtonDirective, typeof EditorItalicButtonDirective, typeof EditorUnderlineButtonDirective, typeof EditorStrikethroughButtonDirective, typeof EditorSubscriptButtonDirective, typeof EditorSuperscriptButtonDirective, typeof EditorForeColorDirective, typeof EditorBackColorDirective, typeof EditorCleanFormattingButtonDirective, typeof EditorAddColumnBeforeButtonDirective, typeof EditorAddColumnAfterButtonDirective, typeof EditorAddRowBeforeButtonDirective, typeof EditorAddRowAfterButtonDirective, typeof EditorDeleteColumnButtonDirective, typeof EditorDeleteRowButtonDirective, typeof EditorDeleteTableButtonDirective, typeof CustomMessagesComponent, typeof EditorPrintDirective, typeof EditorSelectAllButtonDirective, typeof EditorBlockquoteDirective, typeof EditorFontSizeComponent, typeof EditorFontFamilyComponent, typeof EditorFormatComponent, typeof EditorColorPickerComponent, typeof EditorInsertTableButtonComponent, typeof EditorMergeCellsButtonDirective, typeof EditorSplitCellButtonDirective];
|
package/editor.component.d.ts
CHANGED
|
@@ -22,6 +22,13 @@ import { EditorCssSettings } from './common/css-settings.interface';
|
|
|
22
22
|
import * as i0 from "@angular/core";
|
|
23
23
|
/**
|
|
24
24
|
* Represents the [Kendo UI Editor component for Angular]({% slug overview_editor %}).
|
|
25
|
+
*
|
|
26
|
+
* Use the Editor to create and edit rich text content in your Angular applications.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```html
|
|
30
|
+
* <kendo-editor [(value)]="editorValue"></kendo-editor>
|
|
31
|
+
* ```
|
|
25
32
|
*/
|
|
26
33
|
export declare class EditorComponent implements AfterViewInit, ControlValueAccessor {
|
|
27
34
|
private dialogService;
|
|
@@ -34,90 +41,92 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
34
41
|
private renderer;
|
|
35
42
|
/**
|
|
36
43
|
* Sets the value of the Editor ([see example](slug:overview_editor)).
|
|
44
|
+
* Use this property to update the Editor content programmatically.
|
|
37
45
|
*/
|
|
38
46
|
set value(value: string);
|
|
39
47
|
get value(): string;
|
|
40
48
|
/**
|
|
41
|
-
* Sets the disabled state of the component. To
|
|
49
|
+
* Sets the disabled state of the component. To disable the Editor in reactive forms, see [Forms Support](slug:formssupport_editor#toc-managing-the-editor-disabled-state-in-reactive-forms).
|
|
42
50
|
*/
|
|
43
51
|
set disabled(value: boolean);
|
|
44
52
|
get disabled(): boolean;
|
|
45
53
|
/**
|
|
46
54
|
* Sets the read-only state of the component.
|
|
47
55
|
*
|
|
56
|
+
* When `true`, users cannot edit the content.
|
|
48
57
|
* @default false
|
|
49
58
|
*/
|
|
50
59
|
set readonly(value: boolean);
|
|
51
60
|
get readonly(): boolean;
|
|
52
61
|
/**
|
|
53
|
-
* If set to `false`, the Editor
|
|
54
|
-
*
|
|
62
|
+
* If set to `false`, the Editor runs in non-encapsulated style mode.
|
|
63
|
+
* The Editor content inherits styles from the page.
|
|
55
64
|
* @default true
|
|
56
65
|
*/
|
|
57
66
|
iframe: boolean;
|
|
58
67
|
/**
|
|
59
|
-
*
|
|
68
|
+
* Applies custom CSS styles to the Editor in iframe mode.
|
|
69
|
+
* Use this property to provide additional CSS for the Editor content.
|
|
60
70
|
*/
|
|
61
71
|
set iframeCss(settings: EditorCssSettings);
|
|
62
72
|
get iframeCss(): EditorCssSettings;
|
|
63
73
|
/**
|
|
64
|
-
*
|
|
74
|
+
* When set to `true` or an `ApplyToWordOptions` object, emphasis or inline style commands apply to the whole word at the cursor.
|
|
65
75
|
* @default false
|
|
66
76
|
*/
|
|
67
77
|
applyToWord: boolean | ApplyToWordOptions;
|
|
68
78
|
/**
|
|
69
|
-
*
|
|
79
|
+
* Provides a custom schema for the Editor ([see example]({% slug schema_editor %})).
|
|
70
80
|
*/
|
|
71
81
|
set schema(value: Schema);
|
|
72
82
|
get schema(): Schema;
|
|
73
83
|
/**
|
|
74
|
-
* Defines a function
|
|
75
|
-
*
|
|
76
|
-
* the plugins collection that will be used when creating the Editor component. ([see example]({% slug plugins_editor %}))
|
|
84
|
+
* Defines a function to customize the plugins used by the Editor.
|
|
85
|
+
* The function receives the default plugins and returns the plugins to use ([see example]({% slug plugins_editor %})).
|
|
77
86
|
*/
|
|
78
87
|
set plugins(fn: PluginsFn);
|
|
79
88
|
get plugins(): PluginsFn;
|
|
80
89
|
/**
|
|
81
|
-
*
|
|
90
|
+
* Sets the hint text displayed when the Editor is empty.
|
|
91
|
+
* Use this property to provide guidance to users.
|
|
82
92
|
*/
|
|
83
93
|
set placeholder(value: string);
|
|
84
94
|
get placeholder(): string;
|
|
85
95
|
/**
|
|
86
|
-
*
|
|
87
|
-
* Set to `true` to preserve whitespace
|
|
88
|
-
* Set to `'full'` to preserve whitespace
|
|
89
|
-
*
|
|
96
|
+
* Controls whitespace handling in the Editor content.
|
|
97
|
+
* Set to `true` to preserve whitespace and normalize newlines to spaces.
|
|
98
|
+
* Set to `'full'` to preserve all whitespace.
|
|
90
99
|
* @default false
|
|
91
100
|
*/
|
|
92
101
|
preserveWhitespace: boolean | 'full';
|
|
93
102
|
/**
|
|
94
|
-
* Configures how pasted content is
|
|
103
|
+
* Configures how pasted content is cleaned before it is added to the Editor ([see example]({% slug paste_cleanup %})).
|
|
104
|
+
* Use this property to remove unwanted HTML, styles, or attributes from pasted content.
|
|
95
105
|
*/
|
|
96
106
|
pasteCleanupSettings: PasteCleanupSettings;
|
|
97
107
|
/**
|
|
98
108
|
* Determines whether the Editor can be resized ([see example](slug:resizing_editor#toc-resizing-the-editor)).
|
|
109
|
+
* Set to `true` or provide an object with resizing options.
|
|
99
110
|
* @default false
|
|
100
111
|
*/
|
|
101
112
|
resizable: boolean | EditorResizableOptions;
|
|
102
113
|
/**
|
|
103
|
-
* Fires
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* the `valueChange` event is not triggered because it might cause a mix-up with the
|
|
107
|
-
* built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
|
|
114
|
+
* Fires when the Editor value changes due to user interaction.
|
|
115
|
+
* This event does not fire when the value changes programmatically through `ngModel` or form bindings
|
|
116
|
+
* ([see example](slug:events_editor)).
|
|
108
117
|
*/
|
|
109
118
|
valueChange: EventEmitter<string>;
|
|
110
119
|
/**
|
|
111
|
-
* Fires when the content area
|
|
120
|
+
* Fires when the Editor content area receives focus ([see example](slug:events_editor)).
|
|
112
121
|
*/
|
|
113
122
|
onFocus: EventEmitter<undefined>;
|
|
114
123
|
/**
|
|
115
|
-
* Fires when the user
|
|
116
|
-
*
|
|
124
|
+
* Fires when the user paste content into the Editor ([see example](slug:events_editor)).
|
|
125
|
+
* This event is preventable. If you cancel it, the Editor content does not change.
|
|
117
126
|
*/
|
|
118
127
|
paste: EventEmitter<EditorPasteEvent>;
|
|
119
128
|
/**
|
|
120
|
-
* Fires when the content area
|
|
129
|
+
* Fires when the Editor content area is blurred ([see example](slug:events_editor)).
|
|
121
130
|
*/
|
|
122
131
|
onBlur: EventEmitter<undefined>;
|
|
123
132
|
hostClass: boolean;
|
|
@@ -141,12 +150,12 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
141
150
|
get toolbar(): ToolBarComponent;
|
|
142
151
|
get toolbarElement(): ElementRef;
|
|
143
152
|
/**
|
|
144
|
-
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
|
|
145
|
-
*
|
|
153
|
+
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object.
|
|
154
|
+
* Use this property to access the underlying `EditorView` instance.
|
|
146
155
|
*/
|
|
147
156
|
get view(): EditorView;
|
|
148
157
|
/**
|
|
149
|
-
* Returns the text
|
|
158
|
+
* Returns the text currently selected in the Editor ([see example]({% slug selection_editor %}#toc-retrieve-the-selected-text)).
|
|
150
159
|
*/
|
|
151
160
|
get selectionText(): string;
|
|
152
161
|
/**
|
package/editor.module.d.ts
CHANGED
|
@@ -48,21 +48,22 @@ import * as i42 from "./tools/tables/editor-merge-cells-button.directive";
|
|
|
48
48
|
import * as i43 from "./tools/tables/editor-split-cell-button.directive";
|
|
49
49
|
import * as i44 from "@progress/kendo-angular-toolbar";
|
|
50
50
|
/**
|
|
51
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
51
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) for the Editor component.
|
|
52
|
+
* Use this module to import the Editor and its related directives and services into your NgModule-based Angular application.
|
|
52
53
|
*
|
|
53
|
-
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
54
56
|
* import { NgModule } from '@angular/core';
|
|
55
57
|
* import { EditorModule } from '@progress/kendo-angular-editor';
|
|
56
58
|
* import { BrowserModule } from "@angular/platform-browser";
|
|
57
59
|
* import { AppComponent } from './app.component';
|
|
58
60
|
*
|
|
59
|
-
*
|
|
61
|
+
* @NgModule({
|
|
60
62
|
* declarations: [AppComponent],
|
|
61
63
|
* imports: [BrowserModule, EditorModule],
|
|
62
64
|
* bootstrap: [AppComponent]
|
|
63
65
|
* })
|
|
64
66
|
* export class AppModule {}
|
|
65
|
-
*
|
|
66
67
|
* ```
|
|
67
68
|
*/
|
|
68
69
|
export declare class EditorModule {
|
|
@@ -12,5 +12,5 @@ export const EditorErrorMessages = {
|
|
|
12
12
|
pastedContentCallbackType: (arg) => `pastedContent must be a function, but received ${JSON.stringify(arg)}.`,
|
|
13
13
|
setPluginsOnce: 'The plugins cannot be changed dynamically. See https://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
|
|
14
14
|
setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See https://www.telerik.com/kendo-angular-ui/components/editor/plugins/#toc-custom-plugins/',
|
|
15
|
-
printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui
|
|
15
|
+
printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui/components/editor/api/EditorPrintDirective/'
|
|
16
16
|
};
|
package/esm2022/directives.mjs
CHANGED
|
@@ -46,7 +46,7 @@ import { EditorSelectAllButtonDirective } from './tools/select-all/select-all-bu
|
|
|
46
46
|
import { EditorSplitCellButtonDirective } from './tools/tables/editor-split-cell-button.directive';
|
|
47
47
|
import { EditorMergeCellsButtonDirective } from './tools/tables/editor-merge-cells-button.directive';
|
|
48
48
|
/**
|
|
49
|
-
* Utility array that contains all `Editor` related components and directives
|
|
49
|
+
* Utility array that contains all `Editor` related components and directives.
|
|
50
50
|
*/
|
|
51
51
|
export const KENDO_EDITOR = [
|
|
52
52
|
EditorComponent,
|