@progress/kendo-angular-editor 2.4.2 → 2.5.0-dev.202111240844
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/dist/cdn/js/kendo-angular-editor.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/common/error-messages.js +2 -1
- package/dist/es/common/styles.js +1 -1
- package/dist/es/config/command-icons.js +4 -2
- package/dist/es/config/commands.js +32 -31
- package/dist/es/editor-toolbar-state.js +20 -2
- package/dist/es/editor.component.js +7 -5
- package/dist/es/editor.module.js +7 -1
- package/dist/es/index.js +2 -0
- package/dist/es/localization/messages.js +8 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/print/editor-print-button.directive.js +67 -0
- package/dist/es/tools/select-all/select-all-button.directive.js +48 -0
- package/dist/es/tools/shared/editor-command-base.js +10 -10
- package/dist/es/tools/tables/editor-insert-table-button.component.js +5 -8
- package/dist/es2015/common/commands.d.ts +5 -1
- package/dist/es2015/common/error-messages.js +2 -1
- package/dist/es2015/common/styles.d.ts +1 -1
- package/dist/es2015/common/styles.js +72 -0
- package/dist/es2015/config/command-icons.d.ts +2 -2
- package/dist/es2015/config/command-icons.js +4 -2
- package/dist/es2015/config/commands.js +31 -30
- package/dist/es2015/editor-toolbar-state.js +20 -2
- package/dist/es2015/editor.component.d.ts +5 -0
- package/dist/es2015/editor.component.js +10 -4
- package/dist/es2015/editor.module.js +7 -1
- package/dist/es2015/index.d.ts +2 -0
- package/dist/es2015/index.js +2 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/messages.d.ts +8 -0
- package/dist/es2015/localization/messages.js +8 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/tools/print/editor-print-button.directive.d.ts +33 -0
- package/dist/es2015/tools/print/editor-print-button.directive.js +64 -0
- package/dist/es2015/tools/select-all/select-all-button.directive.d.ts +29 -0
- package/dist/es2015/tools/select-all/select-all-button.directive.js +46 -0
- package/dist/es2015/tools/shared/editor-command-base.d.ts +3 -3
- package/dist/es2015/tools/shared/editor-command-base.js +9 -9
- package/dist/es2015/tools/shared/editor-command-button.d.ts +3 -3
- package/dist/es2015/tools/tables/editor-insert-table-button.component.d.ts +2 -3
- package/dist/es2015/tools/tables/editor-insert-table-button.component.js +13 -8
- package/dist/fesm2015/index.js +263 -57
- package/dist/fesm5/index.js +188 -61
- package/dist/npm/common/error-messages.js +2 -1
- package/dist/npm/common/styles.js +1 -1
- package/dist/npm/config/command-icons.js +4 -2
- package/dist/npm/config/commands.js +33 -31
- package/dist/npm/editor-toolbar-state.js +20 -2
- package/dist/npm/editor.component.js +6 -4
- package/dist/npm/editor.module.js +7 -1
- package/dist/npm/index.js +4 -0
- package/dist/npm/localization/messages.js +8 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/tools/print/editor-print-button.directive.js +69 -0
- package/dist/npm/tools/select-all/select-all-button.directive.js +50 -0
- package/dist/npm/tools/shared/editor-command-base.js +10 -10
- package/dist/npm/tools/tables/editor-insert-table-button.component.js +5 -8
- package/dist/systemjs/kendo-angular-editor.js +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export const EditorErrorMessages = {
|
|
|
12
12
|
setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
|
|
13
13
|
pluginsCallbackType: ɵ0,
|
|
14
14
|
setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
|
|
15
|
-
setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/'
|
|
15
|
+
setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
|
|
16
|
+
printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorPrintButtonDirective/'
|
|
16
17
|
};
|
|
17
18
|
export { ɵ0 };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
|
-
export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\ndiv.ProseMirror {\n position: relative;\n min-height: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\ndiv.ProseMirror:focus {\n outline: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror li {\n position: relative;\n}\n\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n";
|
|
8
|
+
export declare const defaultStyle = "\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\ndiv.ProseMirror {\n position: relative;\n min-height: 100%;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0; /* the above doesn't seem to work in Edge */\n}\n\ndiv.ProseMirror:focus {\n outline: none;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror li {\n position: relative;\n}\n\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.ProseMirror .k-placeholder::before {\n content: attr(data-placeholder);\n height: 0;\n color: #8a8a8a;\n float: left;\n opacity: 1;\n cursor: text;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n/* image resizing */\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n";
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
@@ -105,6 +105,78 @@ li.ProseMirror-selectednode:after {
|
|
|
105
105
|
-ms-user-select: none;
|
|
106
106
|
user-select: none;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
/* image resizing */
|
|
110
|
+
.k-editor-resize-handles-wrapper {
|
|
111
|
+
position: absolute;
|
|
112
|
+
visibility: hidden;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.k-editor-resize-handle {
|
|
116
|
+
position: absolute;
|
|
117
|
+
visibility: visible;
|
|
118
|
+
background-color: #fff;
|
|
119
|
+
border: 1px solid #000;
|
|
120
|
+
z-index: 100;
|
|
121
|
+
width: 5px;
|
|
122
|
+
height: 5px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.k-editor-resize-handle.northwest {
|
|
126
|
+
top: 0;
|
|
127
|
+
left: 0;
|
|
128
|
+
transform: translate(-50%, -50%);
|
|
129
|
+
cursor: nw-resize;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.k-editor-resize-handle.north {
|
|
133
|
+
top: 0;
|
|
134
|
+
left: 50%;
|
|
135
|
+
transform: translate(-50%, -50%);
|
|
136
|
+
cursor: n-resize;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.k-editor-resize-handle.northeast {
|
|
140
|
+
top: 0;
|
|
141
|
+
right: 0;
|
|
142
|
+
transform: translate(50%, -50%);
|
|
143
|
+
cursor: ne-resize;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.k-editor-resize-handle.southwest {
|
|
147
|
+
left: 0;
|
|
148
|
+
bottom: 0;
|
|
149
|
+
transform: translate(-50%, 50%);
|
|
150
|
+
cursor: sw-resize;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.k-editor-resize-handle.south {
|
|
154
|
+
bottom: 0;
|
|
155
|
+
left: 50%;
|
|
156
|
+
transform: translate(-50%, 50%);
|
|
157
|
+
cursor: s-resize;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.k-editor-resize-handle.southeast {
|
|
161
|
+
right: 0;
|
|
162
|
+
bottom: 0;
|
|
163
|
+
transform: translate(50%, 50%);
|
|
164
|
+
cursor: se-resize;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.k-editor-resize-handle.west {
|
|
168
|
+
top: 50%;
|
|
169
|
+
left: 0;
|
|
170
|
+
transform: translate(-50%, -50%);
|
|
171
|
+
cursor: w-resize;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.k-editor-resize-handle.east {
|
|
175
|
+
top: 50%;
|
|
176
|
+
right: 0;
|
|
177
|
+
transform: translate(50%, -50%);
|
|
178
|
+
cursor: e-resize;
|
|
179
|
+
}
|
|
108
180
|
`;
|
|
109
181
|
/**
|
|
110
182
|
* @hidden
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { EditorCommand, DialogCommand } from '../common/commands';
|
|
5
|
+
import { EditorCommand, DialogCommand, EditorInternalCommand } from '../common/commands';
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const commandIcons: Partial<Record<EditorCommand | DialogCommand, string>>;
|
|
9
|
+
export declare const commandIcons: Partial<Record<EditorCommand | DialogCommand | EditorInternalCommand, string>>;
|
|
@@ -10,9 +10,11 @@ export const commandIcons = {
|
|
|
10
10
|
alignJustify: 'align-justify',
|
|
11
11
|
alignLeft: 'align-left',
|
|
12
12
|
alignRight: 'align-right',
|
|
13
|
+
backColor: 'background',
|
|
13
14
|
bold: 'bold',
|
|
14
15
|
cleanFormatting: 'clear-css',
|
|
15
16
|
createLink: 'link-horizontal',
|
|
17
|
+
foreColor: 'foreground-color',
|
|
16
18
|
indent: 'indent-increase',
|
|
17
19
|
insertFile: 'file-add',
|
|
18
20
|
insertImage: 'image',
|
|
@@ -20,7 +22,9 @@ export const commandIcons = {
|
|
|
20
22
|
insertUnorderedList: 'list-unordered',
|
|
21
23
|
italic: 'italic',
|
|
22
24
|
outdent: 'indent-decrease',
|
|
25
|
+
print: 'print',
|
|
23
26
|
redo: 'redo',
|
|
27
|
+
selectAll: 'select-all',
|
|
24
28
|
strikethrough: 'strikethrough',
|
|
25
29
|
subscript: 'sub-script',
|
|
26
30
|
superscript: 'sup-script',
|
|
@@ -28,8 +32,6 @@ export const commandIcons = {
|
|
|
28
32
|
undo: 'undo',
|
|
29
33
|
unlink: 'unlink-horizontal',
|
|
30
34
|
viewSource: 'html',
|
|
31
|
-
foreColor: 'foreground-color',
|
|
32
|
-
backColor: 'background',
|
|
33
35
|
//table
|
|
34
36
|
insertTable: 'table-insert',
|
|
35
37
|
addColumnBefore: 'table-column-insert-left',
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { alignBlocks, alignLeftRules, alignCenterRules, alignRightRules, alignJustifyRules, alignRemoveRules, indent, outdent, setHtml, getHtml, insertImage, insertText, applyLink, removeLink, expandToWordWrap,
|
|
6
6
|
//marks
|
|
7
|
-
bold, italic, underline, strikethrough, subscript, superscript, link, toggleInlineFormat, applyInlineStyle, formatBlockElements, toggleOrderedList, toggleUnorderedList, isAligned, undo, redo, cleanFormatting } from '@progress/kendo-editor-common';
|
|
7
|
+
bold, italic, underline, strikethrough, subscript, superscript, link, toggleInlineFormat, applyInlineStyle, formatBlockElements, toggleOrderedList, toggleUnorderedList, isAligned, undo, redo, cleanFormatting, selectAll } from '@progress/kendo-editor-common';
|
|
8
8
|
import { insertTable, deleteTable, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell } from './table-commands';
|
|
9
9
|
const alignRemove = (state, dispatch) => alignBlocks(alignRemoveRules)(state, dispatch);
|
|
10
10
|
const ɵ0 = alignRemove;
|
|
11
|
-
const ɵ1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2 = (options) => cleanFormatting(options), ɵ3 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7 = text => insertText(text), ɵ8 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord });
|
|
11
|
+
const ɵ1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2 = (options) => cleanFormatting(options), ɵ3 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7 = text => insertText(text), ɵ8 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ16 = () => (state, dispatch) => selectAll(state, dispatch);
|
|
12
12
|
const inlineCommand = {
|
|
13
13
|
bold: ɵ1,
|
|
14
14
|
cleanFormatting: ɵ2,
|
|
@@ -24,42 +24,43 @@ const inlineCommand = {
|
|
|
24
24
|
underline: ɵ12,
|
|
25
25
|
unlink: ɵ13,
|
|
26
26
|
foreColor: ɵ14,
|
|
27
|
-
backColor: ɵ15
|
|
27
|
+
backColor: ɵ15,
|
|
28
|
+
selectAll: ɵ16
|
|
28
29
|
};
|
|
29
|
-
const ɵ
|
|
30
|
+
const ɵ17 = () => (state, dispatch) => isAligned(state, alignCenterRules) ? alignRemove(state, dispatch) : alignBlocks(alignCenterRules)(state, dispatch), ɵ18 = () => (state, dispatch) => isAligned(state, alignJustifyRules) ? alignRemove(state, dispatch) : alignBlocks(alignJustifyRules)(state, dispatch), ɵ19 = () => (state, dispatch) => isAligned(state, alignLeftRules) ? alignRemove(state, dispatch) : alignBlocks(alignLeftRules)(state, dispatch), ɵ20 = () => (state, dispatch) => isAligned(state, alignRightRules) ? alignRemove(state, dispatch) : alignBlocks(alignRightRules)(state, dispatch), ɵ21 = formatAttr => formatBlockElements(formatAttr.tag), ɵ22 = () => getHtml, ɵ23 = () => indent, ɵ24 = attrs => insertImage(attrs), ɵ25 = () => toggleOrderedList, ɵ26 = () => toggleUnorderedList, ɵ27 = () => outdent, ɵ28 = () => redo, ɵ29 = ({ content, parseOptions }) => setHtml(content, 'setHTML', parseOptions), ɵ30 = () => undo;
|
|
30
31
|
const blockCommand = {
|
|
31
|
-
alignCenter: ɵ
|
|
32
|
-
alignJustify: ɵ
|
|
33
|
-
alignLeft: ɵ
|
|
34
|
-
alignRight: ɵ
|
|
35
|
-
format: ɵ
|
|
36
|
-
getHTML: ɵ
|
|
37
|
-
indent: ɵ
|
|
38
|
-
insertImage: ɵ
|
|
32
|
+
alignCenter: ɵ17,
|
|
33
|
+
alignJustify: ɵ18,
|
|
34
|
+
alignLeft: ɵ19,
|
|
35
|
+
alignRight: ɵ20,
|
|
36
|
+
format: ɵ21,
|
|
37
|
+
getHTML: ɵ22,
|
|
38
|
+
indent: ɵ23,
|
|
39
|
+
insertImage: ɵ24,
|
|
39
40
|
// think about changing the command name.
|
|
40
|
-
insertOrderedList: ɵ
|
|
41
|
+
insertOrderedList: ɵ25,
|
|
41
42
|
// think about changing the command name.
|
|
42
|
-
insertUnorderedList: ɵ
|
|
43
|
-
outdent: ɵ
|
|
44
|
-
redo: ɵ
|
|
45
|
-
setHTML: ɵ
|
|
46
|
-
undo: ɵ
|
|
43
|
+
insertUnorderedList: ɵ26,
|
|
44
|
+
outdent: ɵ27,
|
|
45
|
+
redo: ɵ28,
|
|
46
|
+
setHTML: ɵ29,
|
|
47
|
+
undo: ɵ30
|
|
47
48
|
};
|
|
48
|
-
const ɵ
|
|
49
|
+
const ɵ31 = attr => insertTable(attr), ɵ32 = () => addColumnBefore, ɵ33 = () => addColumnAfter, ɵ34 = () => addRowBefore, ɵ35 = () => addRowAfter, ɵ36 = () => deleteRow, ɵ37 = () => deleteColumn, ɵ38 = () => mergeCells, ɵ39 = () => splitCell, ɵ40 = () => deleteTable;
|
|
49
50
|
const tableCommand = {
|
|
50
|
-
insertTable: ɵ
|
|
51
|
-
addColumnBefore: ɵ
|
|
52
|
-
addColumnAfter: ɵ
|
|
53
|
-
addRowBefore: ɵ
|
|
54
|
-
addRowAfter: ɵ
|
|
55
|
-
deleteRow: ɵ
|
|
56
|
-
deleteColumn: ɵ
|
|
57
|
-
mergeCells: ɵ
|
|
58
|
-
splitCell: ɵ
|
|
59
|
-
deleteTable: ɵ
|
|
51
|
+
insertTable: ɵ31,
|
|
52
|
+
addColumnBefore: ɵ32,
|
|
53
|
+
addColumnAfter: ɵ33,
|
|
54
|
+
addRowBefore: ɵ34,
|
|
55
|
+
addRowAfter: ɵ35,
|
|
56
|
+
deleteRow: ɵ36,
|
|
57
|
+
deleteColumn: ɵ37,
|
|
58
|
+
mergeCells: ɵ38,
|
|
59
|
+
splitCell: ɵ39,
|
|
60
|
+
deleteTable: ɵ40
|
|
60
61
|
};
|
|
61
62
|
/**
|
|
62
63
|
* @hidden
|
|
63
64
|
*/
|
|
64
65
|
export const editorCommands = Object.assign({}, inlineCommand, blockCommand, tableCommand);
|
|
65
|
-
export { ɵ0, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9, ɵ10, ɵ11, ɵ12, ɵ13, ɵ14, ɵ15, ɵ16, ɵ17, ɵ18, ɵ19, ɵ20, ɵ21, ɵ22, ɵ23, ɵ24, ɵ25, ɵ26, ɵ27, ɵ28, ɵ29, ɵ30, ɵ31, ɵ32, ɵ33, ɵ34, ɵ35, ɵ36, ɵ37, ɵ38, ɵ39 };
|
|
66
|
+
export { ɵ0, ɵ1, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9, ɵ10, ɵ11, ɵ12, ɵ13, ɵ14, ɵ15, ɵ16, ɵ17, ɵ18, ɵ19, ɵ20, ɵ21, ɵ22, ɵ23, ɵ24, ɵ25, ɵ26, ɵ27, ɵ28, ɵ29, ɵ30, ɵ31, ɵ32, ɵ33, ɵ34, ɵ35, ɵ36, ɵ37, ɵ38, ɵ39, ɵ40 };
|
|
@@ -64,6 +64,10 @@ export const getToolbarState = (state, options) => ({
|
|
|
64
64
|
selected: false,
|
|
65
65
|
disabled: !redo(state)
|
|
66
66
|
},
|
|
67
|
+
selectAll: {
|
|
68
|
+
selected: false,
|
|
69
|
+
disabled: false
|
|
70
|
+
},
|
|
67
71
|
strikethrough: {
|
|
68
72
|
selected: hasMark(state, strikethrough),
|
|
69
73
|
disabled: false
|
|
@@ -113,6 +117,12 @@ export const getToolbarState = (state, options) => ({
|
|
|
113
117
|
selected: false,
|
|
114
118
|
disabled: false
|
|
115
119
|
},
|
|
120
|
+
// print
|
|
121
|
+
print: {
|
|
122
|
+
selected: false,
|
|
123
|
+
disabled: false
|
|
124
|
+
},
|
|
125
|
+
// table
|
|
116
126
|
insertTable: {
|
|
117
127
|
selected: false,
|
|
118
128
|
disabled: false
|
|
@@ -185,6 +195,8 @@ export const initialToolBarState = {
|
|
|
185
195
|
//history
|
|
186
196
|
redo: { selected: false, disabled: true },
|
|
187
197
|
undo: { selected: false, disabled: true },
|
|
198
|
+
// print
|
|
199
|
+
print: { selected: false, disabled: false },
|
|
188
200
|
//dialogs
|
|
189
201
|
createLink: { selected: false, disabled: true },
|
|
190
202
|
insertFile: { selected: false, disabled: true },
|
|
@@ -200,7 +212,9 @@ export const initialToolBarState = {
|
|
|
200
212
|
deleteColumn: { selected: false, disabled: true },
|
|
201
213
|
mergeCells: { selected: false, disabled: true },
|
|
202
214
|
splitCell: { selected: false, disabled: true },
|
|
203
|
-
deleteTable: { selected: false, disabled: true }
|
|
215
|
+
deleteTable: { selected: false, disabled: true },
|
|
216
|
+
// select all
|
|
217
|
+
selectAll: { selected: false, disabled: false }
|
|
204
218
|
};
|
|
205
219
|
/**
|
|
206
220
|
* @hidden
|
|
@@ -233,6 +247,8 @@ export const disabledToolBarState = {
|
|
|
233
247
|
//history
|
|
234
248
|
redo: { selected: false, disabled: true },
|
|
235
249
|
undo: { selected: false, disabled: true },
|
|
250
|
+
// print
|
|
251
|
+
print: { selected: false, disabled: true },
|
|
236
252
|
//dialogs
|
|
237
253
|
createLink: { selected: false, disabled: true },
|
|
238
254
|
insertFile: { selected: false, disabled: true },
|
|
@@ -248,5 +264,7 @@ export const disabledToolBarState = {
|
|
|
248
264
|
deleteColumn: { selected: false, disabled: true },
|
|
249
265
|
mergeCells: { selected: false, disabled: true },
|
|
250
266
|
splitCell: { selected: false, disabled: true },
|
|
251
|
-
deleteTable: { selected: false, disabled: true }
|
|
267
|
+
deleteTable: { selected: false, disabled: true },
|
|
268
|
+
// select all
|
|
269
|
+
selectAll: { selected: false, disabled: true }
|
|
252
270
|
};
|
|
@@ -39,6 +39,7 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
39
39
|
/**
|
|
40
40
|
* If set to `false`, the Editor will run in style non-encapsulated mode. This means
|
|
41
41
|
* that the styles of the page will be persisted in the Editor and its content will be affected by them.
|
|
42
|
+
* @default true
|
|
42
43
|
*/
|
|
43
44
|
iframe: boolean;
|
|
44
45
|
/**
|
|
@@ -147,6 +148,10 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
147
148
|
* @hidden
|
|
148
149
|
*/
|
|
149
150
|
focusChangedProgrammatically: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* @hidden
|
|
153
|
+
*/
|
|
154
|
+
shouldEmitFocus: boolean;
|
|
150
155
|
private defaultToolbar;
|
|
151
156
|
private defaultToolbarComponent;
|
|
152
157
|
private subs;
|
|
@@ -11,7 +11,7 @@ import { map, filter, auditTime, take } from 'rxjs/operators';
|
|
|
11
11
|
import { ToolBarComponent } from '@progress/kendo-angular-toolbar';
|
|
12
12
|
import { DialogService } from '@progress/kendo-angular-dialog';
|
|
13
13
|
import { isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
|
|
14
|
-
import { buildKeymap, buildListKeymap, hasSameMarkup, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, gapCursor, getSelectionText } from '@progress/kendo-editor-common';
|
|
14
|
+
import { buildKeymap, buildListKeymap, hasSameMarkup, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, gapCursor, getSelectionText, imageResizing } from '@progress/kendo-editor-common';
|
|
15
15
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
16
16
|
import { packageMetadata } from './package-metadata';
|
|
17
17
|
import { schema } from './config/schema';
|
|
@@ -61,6 +61,7 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
61
61
|
/**
|
|
62
62
|
* If set to `false`, the Editor will run in style non-encapsulated mode. This means
|
|
63
63
|
* that the styles of the page will be persisted in the Editor and its content will be affected by them.
|
|
64
|
+
* @default true
|
|
64
65
|
*/
|
|
65
66
|
this.iframe = true;
|
|
66
67
|
/**
|
|
@@ -477,7 +478,6 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
477
478
|
* Manually focus the Editor.
|
|
478
479
|
*/
|
|
479
480
|
focus() {
|
|
480
|
-
// this.focusChangedProgrammatically = true;
|
|
481
481
|
this.focusChangedProgrammatically = true;
|
|
482
482
|
this._view.focus();
|
|
483
483
|
this.focusChangedProgrammatically = false;
|
|
@@ -585,7 +585,8 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
585
585
|
keymap(buildListKeymap(currentSchema)),
|
|
586
586
|
keymap(buildKeymap(currentSchema, { applyToWord: this.applyToWord })),
|
|
587
587
|
keymap(baseKeymap),
|
|
588
|
-
gapCursor()
|
|
588
|
+
gapCursor(),
|
|
589
|
+
imageResizing()
|
|
589
590
|
];
|
|
590
591
|
if (this.placeholder) {
|
|
591
592
|
defaultPlugins.push(placeholder(this.placeholder));
|
|
@@ -647,8 +648,9 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
647
648
|
if (this.readonly) {
|
|
648
649
|
contentAreaClasslist.add('k-state-focused');
|
|
649
650
|
}
|
|
650
|
-
if (!this.focusChangedProgrammatically) {
|
|
651
|
+
if (!this.focusChangedProgrammatically || this.shouldEmitFocus) {
|
|
651
652
|
this.ngZone.run(() => this.onFocus.emit());
|
|
653
|
+
this.shouldEmitFocus = false;
|
|
652
654
|
}
|
|
653
655
|
}));
|
|
654
656
|
this.subs.add(fromEvent(containerElement, 'focusout')
|
|
@@ -963,8 +965,12 @@ EditorComponent = EditorComponent_1 = tslib_1.__decorate([
|
|
|
963
965
|
linkWebAddress="Web address"
|
|
964
966
|
i18n-outdent="kendo.editor.outdent|The title of the tool that outdents the content."
|
|
965
967
|
outdent="Outdent"
|
|
968
|
+
i18n-print="kendo.editor.print|The title of the print tool."
|
|
969
|
+
print="Print"
|
|
966
970
|
i18n-redo="kendo.editor.redo|The title of the tool that undos the last action."
|
|
967
971
|
redo="Redo"
|
|
972
|
+
i18n-selectAll="kendo.editor.selectAll|The title of the tool that selects all content."
|
|
973
|
+
selectAll="Select All"
|
|
968
974
|
i18n-strikethrough="kendo.editor.strikethrough|The title of the tool that strikes through text."
|
|
969
975
|
strikethrough="Strikethrough"
|
|
970
976
|
i18n-subscript="kendo.editor.subscript|The title of the tool that makes text subscript."
|
|
@@ -66,6 +66,8 @@ import { FontFamilyDropDownListComponent } from './tools/fontfamily/editor-fontf
|
|
|
66
66
|
import { FontSizeDropDownListComponent } from './tools/fontsize/editor-fontsize-dropdownlist.component';
|
|
67
67
|
import { FontSizeDialogComponent } from './dialogs/font-size-dialog.component';
|
|
68
68
|
import { DropDownToolDirective } from './tools/shared/dropdown-tool.directive';
|
|
69
|
+
import { EditorPrintDirective } from './tools/print/editor-print-button.directive';
|
|
70
|
+
import { EditorSelectAllButtonDirective } from './tools/select-all/select-all-button.directive';
|
|
69
71
|
const COMPONENT_DIRECTIVES = [
|
|
70
72
|
//alignment
|
|
71
73
|
EditorAlignLeftButtonDirective,
|
|
@@ -117,7 +119,11 @@ const COMPONENT_DIRECTIVES = [
|
|
|
117
119
|
CustomMessagesComponent,
|
|
118
120
|
LocalizedMessagesDirective,
|
|
119
121
|
// dropdown tools
|
|
120
|
-
DropDownToolDirective
|
|
122
|
+
DropDownToolDirective,
|
|
123
|
+
// print
|
|
124
|
+
EditorPrintDirective,
|
|
125
|
+
// select all
|
|
126
|
+
EditorSelectAllButtonDirective
|
|
121
127
|
];
|
|
122
128
|
const TOOLBAR_TOOLS = [
|
|
123
129
|
EditorFontSizeComponent,
|
package/dist/es2015/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export { EditorInsertFileButtonDirective } from './tools/link/editor-insert-file
|
|
|
43
43
|
export { EditorUnlinkButtonDirective } from './tools/link/editor-unlink-button.directive';
|
|
44
44
|
export { EditorInsertOrderedListButtonDirective } from './tools/list/editor-insert-ordered-list-button.directive';
|
|
45
45
|
export { EditorInsertUnorderedListButtonDirective } from './tools/list/editor-insert-unordered-list-button.directive';
|
|
46
|
+
export { EditorPrintDirective } from './tools/print/editor-print-button.directive';
|
|
47
|
+
export { EditorSelectAllButtonDirective } from './tools/select-all/select-all-button.directive';
|
|
46
48
|
export { DropDownToolDirective } from './tools/shared/dropdown-tool.directive';
|
|
47
49
|
export { EditorCommandBase } from './tools/shared/editor-command-base';
|
|
48
50
|
export { EditorCommandButton } from './tools/shared/editor-command-button';
|
package/dist/es2015/index.js
CHANGED
|
@@ -42,6 +42,8 @@ export { EditorInsertFileButtonDirective } from './tools/link/editor-insert-file
|
|
|
42
42
|
export { EditorUnlinkButtonDirective } from './tools/link/editor-unlink-button.directive';
|
|
43
43
|
export { EditorInsertOrderedListButtonDirective } from './tools/list/editor-insert-ordered-list-button.directive';
|
|
44
44
|
export { EditorInsertUnorderedListButtonDirective } from './tools/list/editor-insert-unordered-list-button.directive';
|
|
45
|
+
export { EditorPrintDirective } from './tools/print/editor-print-button.directive';
|
|
46
|
+
export { EditorSelectAllButtonDirective } from './tools/select-all/select-all-button.directive';
|
|
45
47
|
export { DropDownToolDirective } from './tools/shared/dropdown-tool.directive';
|
|
46
48
|
export { EditorCommandBase } from './tools/shared/editor-command-base';
|
|
47
49
|
export { EditorCommandButton } from './tools/shared/editor-command-button';
|