@progress/kendo-angular-editor 2.5.0-dev.202111161123 → 2.5.0-dev.202111231749
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/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 +4 -3
- 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 +7 -5
- package/dist/es2015/common/commands.d.ts +5 -1
- package/dist/es2015/common/error-messages.js +2 -1
- 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 +7 -2
- 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 +4 -3
- package/dist/es2015/tools/shared/editor-command-base.js +6 -4
- package/dist/es2015/tools/shared/editor-command-button.d.ts +3 -3
- package/dist/fesm2015/index.js +173 -43
- package/dist/fesm5/index.js +177 -46
- package/dist/npm/common/error-messages.js +2 -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 +4 -3
- 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 +7 -5
- package/dist/systemjs/kendo-angular-editor.js +1 -1
- package/package.json +1 -1
package/dist/fesm2015/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { take, filter, auditTime, map, concatMap, takeUntil } from 'rxjs/operato
|
|
|
10
10
|
import { ToolBarComponent, ToolBarToolComponent, ToolBarButtonComponent, ToolBarModule } from '@progress/kendo-angular-toolbar';
|
|
11
11
|
import { DialogContentBase, DialogRef, DialogService, DialogModule } from '@progress/kendo-angular-dialog';
|
|
12
12
|
import { isDocumentAvailable, guid, KendoInput, Keys } from '@progress/kendo-angular-common';
|
|
13
|
-
import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
|
|
13
|
+
import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, selectAll, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
|
|
14
14
|
export { Schema, EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes, getSelectionText } from '@progress/kendo-editor-common';
|
|
15
15
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
16
16
|
import { LocalizationService, L10N_PREFIX, RTL, MessageService, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
@@ -27,7 +27,7 @@ const packageMetadata = {
|
|
|
27
27
|
name: '@progress/kendo-angular-editor',
|
|
28
28
|
productName: 'Kendo UI for Angular',
|
|
29
29
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
30
|
-
publishDate:
|
|
30
|
+
publishDate: 1637689470,
|
|
31
31
|
version: '',
|
|
32
32
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
33
33
|
};
|
|
@@ -1607,7 +1607,7 @@ const deleteTableElement = (selector) => (state, dispatch) => {
|
|
|
1607
1607
|
const deleteTable$1 = deleteTableElement(isTable);
|
|
1608
1608
|
|
|
1609
1609
|
const alignRemove = (state, dispatch) => alignBlocks(alignRemoveRules)(state, dispatch);
|
|
1610
|
-
const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (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 });
|
|
1610
|
+
const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (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);
|
|
1611
1611
|
const inlineCommand = {
|
|
1612
1612
|
bold: ɵ1$5,
|
|
1613
1613
|
cleanFormatting: ɵ2$4,
|
|
@@ -1623,39 +1623,40 @@ const inlineCommand = {
|
|
|
1623
1623
|
underline: ɵ12,
|
|
1624
1624
|
unlink: ɵ13,
|
|
1625
1625
|
foreColor: ɵ14,
|
|
1626
|
-
backColor: ɵ15
|
|
1626
|
+
backColor: ɵ15,
|
|
1627
|
+
selectAll: ɵ16
|
|
1627
1628
|
};
|
|
1628
|
-
const ɵ
|
|
1629
|
+
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;
|
|
1629
1630
|
const blockCommand = {
|
|
1630
|
-
alignCenter: ɵ
|
|
1631
|
-
alignJustify: ɵ
|
|
1632
|
-
alignLeft: ɵ
|
|
1633
|
-
alignRight: ɵ
|
|
1634
|
-
format: ɵ
|
|
1635
|
-
getHTML: ɵ
|
|
1636
|
-
indent: ɵ
|
|
1637
|
-
insertImage: ɵ
|
|
1631
|
+
alignCenter: ɵ17,
|
|
1632
|
+
alignJustify: ɵ18,
|
|
1633
|
+
alignLeft: ɵ19,
|
|
1634
|
+
alignRight: ɵ20,
|
|
1635
|
+
format: ɵ21,
|
|
1636
|
+
getHTML: ɵ22,
|
|
1637
|
+
indent: ɵ23,
|
|
1638
|
+
insertImage: ɵ24,
|
|
1638
1639
|
// think about changing the command name.
|
|
1639
|
-
insertOrderedList: ɵ
|
|
1640
|
+
insertOrderedList: ɵ25,
|
|
1640
1641
|
// think about changing the command name.
|
|
1641
|
-
insertUnorderedList: ɵ
|
|
1642
|
-
outdent: ɵ
|
|
1643
|
-
redo: ɵ
|
|
1644
|
-
setHTML: ɵ
|
|
1645
|
-
undo: ɵ
|
|
1642
|
+
insertUnorderedList: ɵ26,
|
|
1643
|
+
outdent: ɵ27,
|
|
1644
|
+
redo: ɵ28,
|
|
1645
|
+
setHTML: ɵ29,
|
|
1646
|
+
undo: ɵ30
|
|
1646
1647
|
};
|
|
1647
|
-
const ɵ
|
|
1648
|
+
const ɵ31 = attr => insertTable(attr), ɵ32 = () => addColumnBefore$1, ɵ33 = () => addColumnAfter$1, ɵ34 = () => addRowBefore$1, ɵ35 = () => addRowAfter$1, ɵ36 = () => deleteRow$1, ɵ37 = () => deleteColumn$1, ɵ38 = () => mergeCells$1, ɵ39 = () => splitCell$1, ɵ40 = () => deleteTable$1;
|
|
1648
1649
|
const tableCommand = {
|
|
1649
|
-
insertTable: ɵ
|
|
1650
|
-
addColumnBefore: ɵ
|
|
1651
|
-
addColumnAfter: ɵ
|
|
1652
|
-
addRowBefore: ɵ
|
|
1653
|
-
addRowAfter: ɵ
|
|
1654
|
-
deleteRow: ɵ
|
|
1655
|
-
deleteColumn: ɵ
|
|
1656
|
-
mergeCells: ɵ
|
|
1657
|
-
splitCell: ɵ
|
|
1658
|
-
deleteTable: ɵ
|
|
1650
|
+
insertTable: ɵ31,
|
|
1651
|
+
addColumnBefore: ɵ32,
|
|
1652
|
+
addColumnAfter: ɵ33,
|
|
1653
|
+
addRowBefore: ɵ34,
|
|
1654
|
+
addRowAfter: ɵ35,
|
|
1655
|
+
deleteRow: ɵ36,
|
|
1656
|
+
deleteColumn: ɵ37,
|
|
1657
|
+
mergeCells: ɵ38,
|
|
1658
|
+
splitCell: ɵ39,
|
|
1659
|
+
deleteTable: ɵ40
|
|
1659
1660
|
};
|
|
1660
1661
|
/**
|
|
1661
1662
|
* @hidden
|
|
@@ -1722,6 +1723,10 @@ const getToolbarState = (state, options) => ({
|
|
|
1722
1723
|
selected: false,
|
|
1723
1724
|
disabled: !redo(state)
|
|
1724
1725
|
},
|
|
1726
|
+
selectAll: {
|
|
1727
|
+
selected: false,
|
|
1728
|
+
disabled: false
|
|
1729
|
+
},
|
|
1725
1730
|
strikethrough: {
|
|
1726
1731
|
selected: hasMark(state, strikethrough),
|
|
1727
1732
|
disabled: false
|
|
@@ -1771,6 +1776,12 @@ const getToolbarState = (state, options) => ({
|
|
|
1771
1776
|
selected: false,
|
|
1772
1777
|
disabled: false
|
|
1773
1778
|
},
|
|
1779
|
+
// print
|
|
1780
|
+
print: {
|
|
1781
|
+
selected: false,
|
|
1782
|
+
disabled: false
|
|
1783
|
+
},
|
|
1784
|
+
// table
|
|
1774
1785
|
insertTable: {
|
|
1775
1786
|
selected: false,
|
|
1776
1787
|
disabled: false
|
|
@@ -1843,6 +1854,8 @@ const initialToolBarState = {
|
|
|
1843
1854
|
//history
|
|
1844
1855
|
redo: { selected: false, disabled: true },
|
|
1845
1856
|
undo: { selected: false, disabled: true },
|
|
1857
|
+
// print
|
|
1858
|
+
print: { selected: false, disabled: false },
|
|
1846
1859
|
//dialogs
|
|
1847
1860
|
createLink: { selected: false, disabled: true },
|
|
1848
1861
|
insertFile: { selected: false, disabled: true },
|
|
@@ -1858,7 +1871,9 @@ const initialToolBarState = {
|
|
|
1858
1871
|
deleteColumn: { selected: false, disabled: true },
|
|
1859
1872
|
mergeCells: { selected: false, disabled: true },
|
|
1860
1873
|
splitCell: { selected: false, disabled: true },
|
|
1861
|
-
deleteTable: { selected: false, disabled: true }
|
|
1874
|
+
deleteTable: { selected: false, disabled: true },
|
|
1875
|
+
// select all
|
|
1876
|
+
selectAll: { selected: false, disabled: false }
|
|
1862
1877
|
};
|
|
1863
1878
|
/**
|
|
1864
1879
|
* @hidden
|
|
@@ -1891,6 +1906,8 @@ const disabledToolBarState = {
|
|
|
1891
1906
|
//history
|
|
1892
1907
|
redo: { selected: false, disabled: true },
|
|
1893
1908
|
undo: { selected: false, disabled: true },
|
|
1909
|
+
// print
|
|
1910
|
+
print: { selected: false, disabled: true },
|
|
1894
1911
|
//dialogs
|
|
1895
1912
|
createLink: { selected: false, disabled: true },
|
|
1896
1913
|
insertFile: { selected: false, disabled: true },
|
|
@@ -1906,7 +1923,9 @@ const disabledToolBarState = {
|
|
|
1906
1923
|
deleteColumn: { selected: false, disabled: true },
|
|
1907
1924
|
mergeCells: { selected: false, disabled: true },
|
|
1908
1925
|
splitCell: { selected: false, disabled: true },
|
|
1909
|
-
deleteTable: { selected: false, disabled: true }
|
|
1926
|
+
deleteTable: { selected: false, disabled: true },
|
|
1927
|
+
// select all
|
|
1928
|
+
selectAll: { selected: false, disabled: true }
|
|
1910
1929
|
};
|
|
1911
1930
|
|
|
1912
1931
|
/**
|
|
@@ -2524,7 +2543,8 @@ const EditorErrorMessages = {
|
|
|
2524
2543
|
setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
|
|
2525
2544
|
pluginsCallbackType: ɵ0$6,
|
|
2526
2545
|
setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
|
|
2527
|
-
setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/'
|
|
2546
|
+
setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
|
|
2547
|
+
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/'
|
|
2528
2548
|
};
|
|
2529
2549
|
|
|
2530
2550
|
var EditorComponent_1;
|
|
@@ -2563,6 +2583,7 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
2563
2583
|
/**
|
|
2564
2584
|
* If set to `false`, the Editor will run in style non-encapsulated mode. This means
|
|
2565
2585
|
* that the styles of the page will be persisted in the Editor and its content will be affected by them.
|
|
2586
|
+
* @default true
|
|
2566
2587
|
*/
|
|
2567
2588
|
this.iframe = true;
|
|
2568
2589
|
/**
|
|
@@ -2979,7 +3000,6 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
2979
3000
|
* Manually focus the Editor.
|
|
2980
3001
|
*/
|
|
2981
3002
|
focus() {
|
|
2982
|
-
// this.focusChangedProgrammatically = true;
|
|
2983
3003
|
this.focusChangedProgrammatically = true;
|
|
2984
3004
|
this._view.focus();
|
|
2985
3005
|
this.focusChangedProgrammatically = false;
|
|
@@ -3150,8 +3170,9 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
|
|
|
3150
3170
|
if (this.readonly) {
|
|
3151
3171
|
contentAreaClasslist.add('k-state-focused');
|
|
3152
3172
|
}
|
|
3153
|
-
if (!this.focusChangedProgrammatically) {
|
|
3173
|
+
if (!this.focusChangedProgrammatically || this.shouldEmitFocus) {
|
|
3154
3174
|
this.ngZone.run(() => this.onFocus.emit());
|
|
3175
|
+
this.shouldEmitFocus = false;
|
|
3155
3176
|
}
|
|
3156
3177
|
}));
|
|
3157
3178
|
this.subs.add(fromEvent(containerElement, 'focusout')
|
|
@@ -3466,8 +3487,12 @@ EditorComponent = EditorComponent_1 = __decorate([
|
|
|
3466
3487
|
linkWebAddress="Web address"
|
|
3467
3488
|
i18n-outdent="kendo.editor.outdent|The title of the tool that outdents the content."
|
|
3468
3489
|
outdent="Outdent"
|
|
3490
|
+
i18n-print="kendo.editor.print|The title of the print tool."
|
|
3491
|
+
print="Print"
|
|
3469
3492
|
i18n-redo="kendo.editor.redo|The title of the tool that undos the last action."
|
|
3470
3493
|
redo="Redo"
|
|
3494
|
+
i18n-selectAll="kendo.editor.selectAll|The title of the tool that selects all content."
|
|
3495
|
+
selectAll="Select All"
|
|
3471
3496
|
i18n-strikethrough="kendo.editor.strikethrough|The title of the tool that strikes through text."
|
|
3472
3497
|
strikethrough="Strikethrough"
|
|
3473
3498
|
i18n-subscript="kendo.editor.subscript|The title of the tool that makes text subscript."
|
|
@@ -5304,9 +5329,11 @@ const commandIcons = {
|
|
|
5304
5329
|
alignJustify: 'align-justify',
|
|
5305
5330
|
alignLeft: 'align-left',
|
|
5306
5331
|
alignRight: 'align-right',
|
|
5332
|
+
backColor: 'background',
|
|
5307
5333
|
bold: 'bold',
|
|
5308
5334
|
cleanFormatting: 'clear-css',
|
|
5309
5335
|
createLink: 'link-horizontal',
|
|
5336
|
+
foreColor: 'foreground-color',
|
|
5310
5337
|
indent: 'indent-increase',
|
|
5311
5338
|
insertFile: 'file-add',
|
|
5312
5339
|
insertImage: 'image',
|
|
@@ -5314,7 +5341,9 @@ const commandIcons = {
|
|
|
5314
5341
|
insertUnorderedList: 'list-unordered',
|
|
5315
5342
|
italic: 'italic',
|
|
5316
5343
|
outdent: 'indent-decrease',
|
|
5344
|
+
print: 'print',
|
|
5317
5345
|
redo: 'redo',
|
|
5346
|
+
selectAll: 'select-all',
|
|
5318
5347
|
strikethrough: 'strikethrough',
|
|
5319
5348
|
subscript: 'sub-script',
|
|
5320
5349
|
superscript: 'sup-script',
|
|
@@ -5322,8 +5351,6 @@ const commandIcons = {
|
|
|
5322
5351
|
undo: 'undo',
|
|
5323
5352
|
unlink: 'unlink-horizontal',
|
|
5324
5353
|
viewSource: 'html',
|
|
5325
|
-
foreColor: 'foreground-color',
|
|
5326
|
-
backColor: 'background',
|
|
5327
5354
|
//table
|
|
5328
5355
|
insertTable: 'table-insert',
|
|
5329
5356
|
addColumnBefore: 'table-column-insert-left',
|
|
@@ -5352,14 +5379,16 @@ class EditorCommandBase {
|
|
|
5352
5379
|
this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
|
|
5353
5380
|
this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
|
|
5354
5381
|
this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
|
|
5355
|
-
|
|
5382
|
+
}
|
|
5383
|
+
ngAfterViewInit() {
|
|
5384
|
+
setTimeout(() => {
|
|
5356
5385
|
const text = this.localization.get(this.command);
|
|
5357
5386
|
if (text) {
|
|
5358
|
-
this.button.showText =
|
|
5359
|
-
this.button.showIcon =
|
|
5387
|
+
this.button.showText = 'overflow';
|
|
5388
|
+
this.button.showIcon = 'both';
|
|
5360
5389
|
this.button.text = text;
|
|
5361
5390
|
}
|
|
5362
|
-
if (!this.button.icon) {
|
|
5391
|
+
if (!this.button.toolbarOptions.icon) {
|
|
5363
5392
|
this.button.icon = commandIcons[this.command];
|
|
5364
5393
|
}
|
|
5365
5394
|
this.button.title = text;
|
|
@@ -6494,10 +6523,18 @@ __decorate([
|
|
|
6494
6523
|
Input(),
|
|
6495
6524
|
__metadata("design:type", String)
|
|
6496
6525
|
], Messages.prototype, "outdent", void 0);
|
|
6526
|
+
__decorate([
|
|
6527
|
+
Input(),
|
|
6528
|
+
__metadata("design:type", String)
|
|
6529
|
+
], Messages.prototype, "print", void 0);
|
|
6497
6530
|
__decorate([
|
|
6498
6531
|
Input(),
|
|
6499
6532
|
__metadata("design:type", String)
|
|
6500
6533
|
], Messages.prototype, "redo", void 0);
|
|
6534
|
+
__decorate([
|
|
6535
|
+
Input(),
|
|
6536
|
+
__metadata("design:type", String)
|
|
6537
|
+
], Messages.prototype, "selectAll", void 0);
|
|
6501
6538
|
__decorate([
|
|
6502
6539
|
Input(),
|
|
6503
6540
|
__metadata("design:type", String)
|
|
@@ -6698,6 +6735,95 @@ DropDownToolDirective = __decorate([
|
|
|
6698
6735
|
NgZone])
|
|
6699
6736
|
], DropDownToolDirective);
|
|
6700
6737
|
|
|
6738
|
+
/**
|
|
6739
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Print tool
|
|
6740
|
+
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
6741
|
+
* The directive will predefine the `icon` and `click` event handlers of the button.
|
|
6742
|
+
*
|
|
6743
|
+
* > The Editor Print tool is supported in the default [`iframe`](https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorComponent/#toc-iframe) mode only.
|
|
6744
|
+
*
|
|
6745
|
+
* @example
|
|
6746
|
+
* ```ts-no-run
|
|
6747
|
+
* <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
|
|
6748
|
+
* ```
|
|
6749
|
+
*
|
|
6750
|
+
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
6751
|
+
*
|
|
6752
|
+
* @example
|
|
6753
|
+
* ```ts-no-run
|
|
6754
|
+
* <kendo-toolbar-button kendoEditorPrintButton icon="blogger"></kendo-toolbar-button>
|
|
6755
|
+
* ```
|
|
6756
|
+
*/
|
|
6757
|
+
let EditorPrintDirective = class EditorPrintDirective extends EditorCommandButton {
|
|
6758
|
+
constructor(button, editor, localization) {
|
|
6759
|
+
super('print', button, editor, localization);
|
|
6760
|
+
this.editor = editor;
|
|
6761
|
+
}
|
|
6762
|
+
ngAfterViewInit() {
|
|
6763
|
+
if (isDevMode) {
|
|
6764
|
+
if (!this.editor.iframe) {
|
|
6765
|
+
throw new Error(EditorErrorMessages.printTool);
|
|
6766
|
+
}
|
|
6767
|
+
}
|
|
6768
|
+
}
|
|
6769
|
+
clickHandler() {
|
|
6770
|
+
if (this.editor.iframe) {
|
|
6771
|
+
const view = this.editor.view;
|
|
6772
|
+
const dom = view && view.dom;
|
|
6773
|
+
const doc = dom && dom.ownerDocument;
|
|
6774
|
+
const editorWindow = doc && doc.defaultView;
|
|
6775
|
+
if (editorWindow) {
|
|
6776
|
+
editorWindow.print();
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
}
|
|
6780
|
+
};
|
|
6781
|
+
EditorPrintDirective = __decorate([
|
|
6782
|
+
Directive({
|
|
6783
|
+
selector: 'kendo-toolbar-button[kendoEditorPrintButton]'
|
|
6784
|
+
}),
|
|
6785
|
+
__param(1, Host()),
|
|
6786
|
+
__metadata("design:paramtypes", [ToolBarButtonComponent,
|
|
6787
|
+
EditorComponent,
|
|
6788
|
+
EditorLocalizationService])
|
|
6789
|
+
], EditorPrintDirective);
|
|
6790
|
+
|
|
6791
|
+
/**
|
|
6792
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor SelectAll tool
|
|
6793
|
+
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
6794
|
+
* The directive will predefine the `icon` and `click` event handlers of the button.
|
|
6795
|
+
*
|
|
6796
|
+
* @example
|
|
6797
|
+
* ```ts-no-run
|
|
6798
|
+
* <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
|
|
6799
|
+
* ```
|
|
6800
|
+
*
|
|
6801
|
+
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
6802
|
+
*
|
|
6803
|
+
* @example
|
|
6804
|
+
* ```ts-no-run
|
|
6805
|
+
* <kendo-toolbar-button kendoEditorSelectAllButton icon="blogger"></kendo-toolbar-button>
|
|
6806
|
+
* ```
|
|
6807
|
+
*/
|
|
6808
|
+
let EditorSelectAllButtonDirective = class EditorSelectAllButtonDirective extends EditorCommandButton {
|
|
6809
|
+
constructor(button, editor, localization) {
|
|
6810
|
+
super('selectAll', button, editor, localization);
|
|
6811
|
+
}
|
|
6812
|
+
clickHandler() {
|
|
6813
|
+
this.editor.shouldEmitFocus = true;
|
|
6814
|
+
super.clickHandler();
|
|
6815
|
+
}
|
|
6816
|
+
};
|
|
6817
|
+
EditorSelectAllButtonDirective = __decorate([
|
|
6818
|
+
Directive({
|
|
6819
|
+
selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]'
|
|
6820
|
+
}),
|
|
6821
|
+
__param(1, Host()),
|
|
6822
|
+
__metadata("design:paramtypes", [ToolBarButtonComponent,
|
|
6823
|
+
EditorComponent,
|
|
6824
|
+
EditorLocalizationService])
|
|
6825
|
+
], EditorSelectAllButtonDirective);
|
|
6826
|
+
|
|
6701
6827
|
const COMPONENT_DIRECTIVES = [
|
|
6702
6828
|
//alignment
|
|
6703
6829
|
EditorAlignLeftButtonDirective,
|
|
@@ -6749,7 +6875,11 @@ const COMPONENT_DIRECTIVES = [
|
|
|
6749
6875
|
CustomMessagesComponent,
|
|
6750
6876
|
LocalizedMessagesDirective,
|
|
6751
6877
|
// dropdown tools
|
|
6752
|
-
DropDownToolDirective
|
|
6878
|
+
DropDownToolDirective,
|
|
6879
|
+
// print
|
|
6880
|
+
EditorPrintDirective,
|
|
6881
|
+
// select all
|
|
6882
|
+
EditorSelectAllButtonDirective
|
|
6753
6883
|
];
|
|
6754
6884
|
const TOOLBAR_TOOLS = [
|
|
6755
6885
|
EditorFontSizeComponent,
|
|
@@ -6863,4 +6993,4 @@ EditorModule = __decorate([
|
|
|
6863
6993
|
* Generated bundle index. Do not edit.
|
|
6864
6994
|
*/
|
|
6865
6995
|
|
|
6866
|
-
export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };
|
|
6996
|
+
export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, EditorPrintDirective, EditorSelectAllButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };
|