@progress/kendo-angular-editor 3.1.2 → 4.0.0-dev.202204140850
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/bundles/kendo-angular-editor.umd.js +5 -0
- package/{dist/es2015/common → common}/active-marks.d.ts +0 -0
- package/{dist/es2015/common → common}/apply-to-word-options.d.ts +0 -0
- package/{dist/es2015/common → common}/commands.d.ts +0 -0
- package/{dist/es2015/common → common}/direction.d.ts +0 -0
- package/{dist/es2015/common → common}/error-messages.d.ts +0 -0
- package/{dist/es2015/common → common}/font-family-item.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/font-size-item.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/format-item.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/image-data.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/link-data.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/paste-cleanup-settings.d.ts +0 -0
- package/{dist/es2015/common → common}/plugins-function.d.ts +0 -1
- package/{dist/es2015/common → common}/predicate.d.ts +0 -0
- package/common/provider.service.d.ts +14 -0
- package/{dist/es2015/common → common}/resizable-options.interface.d.ts +0 -0
- package/{dist/es2015/common → common}/styles.d.ts +0 -0
- package/{dist/es2015/common → common}/table-data.interface.d.ts +0 -0
- package/{dist/es2015/config → config}/command-icons.d.ts +0 -0
- package/{dist/es2015/config → config}/commands.d.ts +0 -0
- package/{dist/es2015/config → config}/schema.d.ts +0 -0
- package/{dist/es2015/config → config}/semantic-nodes.d.ts +0 -0
- package/{dist/es2015/config → config}/table-commands.d.ts +0 -0
- package/{dist/es2015/config → config}/utils.d.ts +8 -8
- package/{dist/es2015/dialogs → dialogs}/colorpicker-dialog.component.d.ts +3 -0
- package/{dist/es2015/dialogs → dialogs}/file-link-dialog.component.d.ts +4 -1
- package/{dist/es2015/dialogs → dialogs}/font-family-dialog.component.d.ts +3 -0
- package/{dist/es2015/dialogs → dialogs}/font-size-dialog.component.d.ts +3 -0
- package/{dist/es2015/dialogs → dialogs}/format-dialog.component.d.ts +4 -1
- package/{dist/es2015/dialogs → dialogs}/image-dialog.component.d.ts +3 -0
- package/{dist/es2015/dialogs → dialogs}/insert-table-dialog.component.d.ts +5 -4
- package/{dist/es2015/dialogs → dialogs}/source-dialog.component.d.ts +3 -0
- package/{dist/es2015/editor-toolbar-state.d.ts → editor-toolbar-state.d.ts} +1 -1
- package/{dist/es2015/editor.component.d.ts → editor.component.d.ts} +32 -20
- package/editor.module.d.ts +113 -0
- package/{dist/es2015 → esm2015}/common/active-marks.js +1 -0
- package/{dist/es2015 → esm2015}/common/apply-to-word-options.js +1 -0
- package/{dist/es → esm2015}/common/commands.js +1 -0
- package/{dist/es2015 → esm2015}/common/direction.js +1 -0
- package/{dist/es2015 → esm2015}/common/error-messages.js +2 -5
- package/{dist/es → esm2015}/common/font-family-item.interface.js +1 -0
- package/{dist/es → esm2015}/common/font-size-item.interface.js +1 -0
- package/{dist/es → esm2015}/common/format-item.interface.js +1 -0
- package/{dist/es → esm2015}/common/image-data.interface.js +1 -0
- package/{dist/es → esm2015}/common/link-data.interface.js +1 -0
- package/{dist/es → esm2015}/common/paste-cleanup-settings.js +1 -0
- package/{dist/es → esm2015}/common/plugins-function.js +1 -0
- package/{dist/es → esm2015}/common/predicate.js +1 -0
- package/esm2015/common/provider.service.js +16 -0
- package/{dist/es → esm2015}/common/resizable-options.interface.js +1 -0
- package/{dist/es2015 → esm2015}/common/styles.js +0 -0
- package/{dist/es → esm2015}/common/table-data.interface.js +1 -0
- package/{dist/es2015 → esm2015}/config/command-icons.js +0 -0
- package/esm2015/config/commands.js +62 -0
- package/{dist/es2015 → esm2015}/config/schema.js +0 -0
- package/{dist/es2015 → esm2015}/config/semantic-nodes.js +1 -4
- package/{dist/es2015 → esm2015}/config/table-commands.js +0 -0
- package/{dist/es2015 → esm2015}/config/utils.js +1 -1
- package/esm2015/dialogs/colorpicker-dialog.component.js +117 -0
- package/esm2015/dialogs/file-link-dialog.component.js +209 -0
- package/esm2015/dialogs/font-family-dialog.component.js +106 -0
- package/esm2015/dialogs/font-size-dialog.component.js +106 -0
- package/esm2015/dialogs/format-dialog.component.js +106 -0
- package/{dist/es2015 → esm2015}/dialogs/image-dialog.component.js +60 -21
- package/esm2015/dialogs/insert-table-dialog.component.js +74 -0
- package/esm2015/dialogs/source-dialog.component.js +89 -0
- package/{dist/es2015 → esm2015}/editor-toolbar-state.js +0 -0
- package/{dist/es2015 → esm2015}/editor.component.js +331 -200
- package/{dist/es2015 → esm2015}/editor.module.js +205 -31
- package/{dist/es/common/active-marks.js → esm2015/kendo-angular-editor.js} +4 -0
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/esm2015/localization/editor-localization.service.js +31 -0
- package/esm2015/localization/localized-messages.directive.js +32 -0
- package/esm2015/localization/messages.js +126 -0
- package/{dist/es2015/index.js → esm2015/main.js} +37 -47
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es → esm2015}/preventable-events/paste-event-data.js +1 -0
- package/{dist/es2015 → esm2015}/preventable-events/paste-event.js +1 -1
- package/esm2015/preventable-events/preventable-event.js +27 -0
- package/esm2015/tools/alignment/editor-align-center-button.directive.js +42 -0
- package/esm2015/tools/alignment/editor-align-justify-button.directive.js +42 -0
- package/esm2015/tools/alignment/editor-align-left-button.directive.js +42 -0
- package/esm2015/tools/alignment/editor-align-right-button.directive.js +42 -0
- package/esm2015/tools/blockquote/editor-blockquote-button.directive.js +41 -0
- package/esm2015/tools/colorpicker/editor-back-color.directive.js +28 -0
- package/esm2015/tools/colorpicker/editor-colorpicker.component.js +262 -0
- package/esm2015/tools/colorpicker/editor-fore-color.directive.js +28 -0
- package/esm2015/tools/editor-clean-formatting-button.directive.js +41 -0
- package/esm2015/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +104 -0
- package/{dist/es2015 → esm2015}/tools/fontfamily/editor-fontfamily.component.js +73 -57
- package/esm2015/tools/fontsize/editor-fontsize-dropdownlist.component.js +93 -0
- package/{dist/es2015 → esm2015}/tools/fontsize/editor-fontsize.component.js +72 -54
- package/esm2015/tools/format/editor-format-dropdownlist.component.js +160 -0
- package/{dist/es2015 → esm2015}/tools/format/editor-format.component.js +69 -51
- package/esm2015/tools/history/editor-redo-button.directive.js +42 -0
- package/esm2015/tools/history/editor-undo-button.directive.js +42 -0
- package/esm2015/tools/image/editor-insert-image-button.directive.js +41 -0
- package/esm2015/tools/indentation/editor-indent-button.directive.js +42 -0
- package/esm2015/tools/indentation/editor-outdent-button.directive.js +42 -0
- package/esm2015/tools/link/editor-create-link-button.directive.js +42 -0
- package/esm2015/tools/link/editor-insert-file-button.directive.js +34 -0
- package/esm2015/tools/link/editor-unlink-button.directive.js +42 -0
- package/esm2015/tools/list/editor-insert-ordered-list-button.directive.js +42 -0
- package/esm2015/tools/list/editor-insert-unordered-list-button.directive.js +42 -0
- package/{dist/es2015 → esm2015}/tools/print/editor-print-button.directive.js +18 -22
- package/esm2015/tools/select-all/select-all-button.directive.js +45 -0
- package/{dist/es2015 → esm2015}/tools/shared/dropdown-tool.directive.js +10 -10
- package/esm2015/tools/shared/editor-command-base.js +64 -0
- package/{dist/es2015 → esm2015}/tools/shared/editor-command-button.js +5 -5
- package/{dist/es2015 → esm2015}/tools/shared/editor-command-dialog.js +4 -5
- package/esm2015/tools/source/editor-view-source-button.directive.js +41 -0
- package/esm2015/tools/tables/editor-add-column-after-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-add-column-before-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-add-row-after-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-add-row-before-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-delete-column-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-delete-row-button.directive.js +35 -0
- package/esm2015/tools/tables/editor-delete-table-button.directive.js +35 -0
- package/{dist/es2015 → esm2015}/tools/tables/editor-insert-table-button.component.js +66 -45
- package/esm2015/tools/tables/editor-merge-cells-button.directive.js +37 -0
- package/esm2015/tools/tables/editor-split-cell-button.directive.js +37 -0
- package/{dist/es2015 → esm2015}/tools/tables/popup-table-grid.component.js +32 -21
- package/esm2015/tools/tools.service.js +20 -0
- package/esm2015/tools/typographical-emphasis/editor-bold-button.directive.js +42 -0
- package/esm2015/tools/typographical-emphasis/editor-italic-button.directive.js +42 -0
- package/esm2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +42 -0
- package/esm2015/tools/typographical-emphasis/editor-subscript-button.directive.js +42 -0
- package/esm2015/tools/typographical-emphasis/editor-superscript-button.directive.js +42 -0
- package/esm2015/tools/typographical-emphasis/editor-underline-button.directive.js +42 -0
- package/{dist/es2015 → esm2015}/util.js +8 -0
- package/fesm2015/kendo-angular-editor.js +6396 -0
- package/kendo-angular-editor.d.ts +9 -0
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +6 -3
- package/{dist/es2015/localization → localization}/editor-localization.service.d.ts +3 -0
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +5 -2
- package/{dist/es2015/localization → localization}/messages.d.ts +4 -1
- package/{dist/es/index.js → main.d.ts} +39 -47
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +44 -121
- package/{dist/es2015/preventable-events → preventable-events}/paste-event-data.d.ts +0 -0
- package/{dist/es2015/preventable-events → preventable-events}/paste-event.d.ts +1 -1
- package/preventable-events/preventable-event.d.ts +21 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/tools → tools}/alignment/editor-align-center-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/alignment/editor-align-justify-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/alignment/editor-align-left-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/alignment/editor-align-right-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/blockquote/editor-blockquote-button.directive.d.ts +5 -3
- package/{dist/es2015/tools → tools}/colorpicker/editor-back-color.directive.d.ts +3 -0
- package/{dist/es2015/tools → tools}/colorpicker/editor-colorpicker.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/colorpicker/editor-fore-color.directive.d.ts +3 -0
- package/{dist/es2015/tools → tools}/editor-clean-formatting-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/fontfamily/editor-fontfamily-dropdownlist.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/fontfamily/editor-fontfamily.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/fontsize/editor-fontsize-dropdownlist.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/fontsize/editor-fontsize.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/format/editor-format-dropdownlist.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/format/editor-format.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/history/editor-redo-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/history/editor-undo-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/image/editor-insert-image-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/indentation/editor-indent-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/indentation/editor-outdent-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/link/editor-create-link-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/link/editor-insert-file-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/link/editor-unlink-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/list/editor-insert-ordered-list-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/list/editor-insert-unordered-list-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/print/editor-print-button.directive.d.ts +5 -3
- package/{dist/es2015/tools → tools}/select-all/select-all-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/shared/dropdown-tool.directive.d.ts +4 -1
- package/{dist/es2015/tools → tools}/shared/editor-command-base.d.ts +8 -4
- package/{dist/es2015/tools → tools}/shared/editor-command-button.d.ts +5 -5
- package/{dist/es2015/tools → tools}/shared/editor-command-dialog.d.ts +4 -5
- package/{dist/es2015/tools → tools}/source/editor-view-source-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-add-column-after-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-add-column-before-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-add-row-after-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-add-row-before-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-delete-column-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-delete-row-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-delete-table-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-insert-table-button.component.d.ts +10 -9
- package/{dist/es2015/tools → tools}/tables/editor-merge-cells-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/editor-split-cell-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/tables/popup-table-grid.component.d.ts +7 -6
- package/{dist/es2015/tools → tools}/tools.service.d.ts +3 -0
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-bold-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-italic-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-strikethrough-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-subscript-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-superscript-button.directive.d.ts +5 -2
- package/{dist/es2015/tools → tools}/typographical-emphasis/editor-underline-button.directive.d.ts +5 -2
- package/{dist/es2015/util.d.ts → util.d.ts} +7 -0
- package/dist/cdn/js/kendo-angular-editor.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/common/apply-to-word-options.js +0 -4
- package/dist/es/common/direction.js +0 -4
- package/dist/es/common/error-messages.js +0 -19
- package/dist/es/common/styles.js +0 -16
- package/dist/es/config/command-icons.js +0 -48
- package/dist/es/config/commands.js +0 -71
- package/dist/es/config/schema.js +0 -22
- package/dist/es/config/semantic-nodes.js +0 -32
- package/dist/es/config/table-commands.js +0 -14
- package/dist/es/config/utils.js +0 -102
- package/dist/es/dialogs/colorpicker-dialog.component.js +0 -70
- package/dist/es/dialogs/file-link-dialog.component.js +0 -126
- package/dist/es/dialogs/font-family-dialog.component.js +0 -65
- package/dist/es/dialogs/font-size-dialog.component.js +0 -65
- package/dist/es/dialogs/format-dialog.component.js +0 -65
- package/dist/es/dialogs/image-dialog.component.js +0 -102
- package/dist/es/dialogs/insert-table-dialog.component.js +0 -49
- package/dist/es/dialogs/source-dialog.component.js +0 -72
- package/dist/es/editor-toolbar-state.js +0 -280
- package/dist/es/editor.component.js +0 -1039
- package/dist/es/editor.module.js +0 -241
- package/dist/es/localization/custom-messages.component.js +0 -45
- package/dist/es/localization/editor-localization.service.js +0 -24
- package/dist/es/localization/localized-messages.directive.js +0 -36
- package/dist/es/localization/messages.js +0 -230
- package/dist/es/main.js +0 -9
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/preventable-events/paste-event.js +0 -25
- package/dist/es/tools/alignment/editor-align-center-button.directive.js +0 -47
- package/dist/es/tools/alignment/editor-align-justify-button.directive.js +0 -47
- package/dist/es/tools/alignment/editor-align-left-button.directive.js +0 -47
- package/dist/es/tools/alignment/editor-align-right-button.directive.js +0 -47
- package/dist/es/tools/blockquote/editor-blockquote-button.directive.js +0 -48
- package/dist/es/tools/colorpicker/editor-back-color.directive.js +0 -28
- package/dist/es/tools/colorpicker/editor-colorpicker.component.js +0 -233
- package/dist/es/tools/colorpicker/editor-fore-color.directive.js +0 -28
- package/dist/es/tools/editor-clean-formatting-button.directive.js +0 -46
- package/dist/es/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -71
- package/dist/es/tools/fontfamily/editor-fontfamily.component.js +0 -211
- package/dist/es/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -71
- package/dist/es/tools/fontsize/editor-fontsize.component.js +0 -206
- package/dist/es/tools/format/editor-format-dropdownlist.component.js +0 -71
- package/dist/es/tools/format/editor-format.component.js +0 -202
- package/dist/es/tools/history/editor-redo-button.directive.js +0 -47
- package/dist/es/tools/history/editor-undo-button.directive.js +0 -47
- package/dist/es/tools/image/editor-insert-image-button.directive.js +0 -46
- package/dist/es/tools/indentation/editor-indent-button.directive.js +0 -47
- package/dist/es/tools/indentation/editor-outdent-button.directive.js +0 -47
- package/dist/es/tools/link/editor-create-link-button.directive.js +0 -47
- package/dist/es/tools/link/editor-insert-file-button.directive.js +0 -39
- package/dist/es/tools/link/editor-unlink-button.directive.js +0 -47
- package/dist/es/tools/list/editor-insert-ordered-list-button.directive.js +0 -47
- package/dist/es/tools/list/editor-insert-unordered-list-button.directive.js +0 -47
- package/dist/es/tools/print/editor-print-button.directive.js +0 -69
- package/dist/es/tools/select-all/select-all-button.directive.js +0 -50
- package/dist/es/tools/shared/dropdown-tool.directive.js +0 -41
- package/dist/es/tools/shared/editor-command-base.js +0 -49
- package/dist/es/tools/shared/editor-command-button.js +0 -34
- package/dist/es/tools/shared/editor-command-dialog.js +0 -30
- package/dist/es/tools/source/editor-view-source-button.directive.js +0 -46
- package/dist/es/tools/tables/editor-add-column-after-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-add-column-before-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-add-row-after-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-add-row-before-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-delete-column-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-delete-row-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-delete-table-button.directive.js +0 -40
- package/dist/es/tools/tables/editor-insert-table-button.component.js +0 -202
- package/dist/es/tools/tables/editor-merge-cells-button.directive.js +0 -42
- package/dist/es/tools/tables/editor-split-cell-button.directive.js +0 -42
- package/dist/es/tools/tables/popup-table-grid.component.js +0 -69
- package/dist/es/tools/tools.service.js +0 -20
- package/dist/es/tools/typographical-emphasis/editor-bold-button.directive.js +0 -47
- package/dist/es/tools/typographical-emphasis/editor-italic-button.directive.js +0 -47
- package/dist/es/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -47
- package/dist/es/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -47
- package/dist/es/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -47
- package/dist/es/tools/typographical-emphasis/editor-underline-button.directive.js +0 -47
- package/dist/es/util.js +0 -127
- package/dist/es2015/common/commands.js +0 -4
- package/dist/es2015/common/font-family-item.interface.js +0 -4
- package/dist/es2015/common/font-size-item.interface.js +0 -4
- package/dist/es2015/common/format-item.interface.js +0 -4
- package/dist/es2015/common/image-data.interface.js +0 -4
- package/dist/es2015/common/link-data.interface.js +0 -4
- package/dist/es2015/common/paste-cleanup-settings.js +0 -4
- package/dist/es2015/common/plugins-function.js +0 -4
- package/dist/es2015/common/predicate.js +0 -4
- package/dist/es2015/common/resizable-options.interface.js +0 -4
- package/dist/es2015/common/table-data.interface.js +0 -4
- package/dist/es2015/config/commands.js +0 -67
- package/dist/es2015/dialogs/colorpicker-dialog.component.js +0 -92
- package/dist/es2015/dialogs/file-link-dialog.component.js +0 -163
- package/dist/es2015/dialogs/font-family-dialog.component.js +0 -84
- package/dist/es2015/dialogs/font-size-dialog.component.js +0 -84
- package/dist/es2015/dialogs/format-dialog.component.js +0 -84
- package/dist/es2015/dialogs/insert-table-dialog.component.js +0 -60
- package/dist/es2015/dialogs/source-dialog.component.js +0 -81
- package/dist/es2015/editor.module.d.ts +0 -45
- package/dist/es2015/index.d.ts +0 -72
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/custom-messages.component.js +0 -37
- package/dist/es2015/localization/editor-localization.service.js +0 -22
- package/dist/es2015/localization/localized-messages.directive.js +0 -32
- package/dist/es2015/localization/messages.js +0 -224
- package/dist/es2015/main.d.ts +0 -13
- package/dist/es2015/main.js +0 -9
- package/dist/es2015/preventable-events/paste-event-data.js +0 -4
- package/dist/es2015/tools/alignment/editor-align-center-button.directive.js +0 -45
- package/dist/es2015/tools/alignment/editor-align-justify-button.directive.js +0 -45
- package/dist/es2015/tools/alignment/editor-align-left-button.directive.js +0 -45
- package/dist/es2015/tools/alignment/editor-align-right-button.directive.js +0 -45
- package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.js +0 -45
- package/dist/es2015/tools/colorpicker/editor-back-color.directive.js +0 -27
- package/dist/es2015/tools/colorpicker/editor-colorpicker.component.js +0 -249
- package/dist/es2015/tools/colorpicker/editor-fore-color.directive.js +0 -27
- package/dist/es2015/tools/editor-clean-formatting-button.directive.js +0 -44
- package/dist/es2015/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -99
- package/dist/es2015/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -94
- package/dist/es2015/tools/format/editor-format-dropdownlist.component.js +0 -127
- package/dist/es2015/tools/history/editor-redo-button.directive.js +0 -45
- package/dist/es2015/tools/history/editor-undo-button.directive.js +0 -45
- package/dist/es2015/tools/image/editor-insert-image-button.directive.js +0 -44
- package/dist/es2015/tools/indentation/editor-indent-button.directive.js +0 -45
- package/dist/es2015/tools/indentation/editor-outdent-button.directive.js +0 -45
- package/dist/es2015/tools/link/editor-create-link-button.directive.js +0 -45
- package/dist/es2015/tools/link/editor-insert-file-button.directive.js +0 -37
- package/dist/es2015/tools/link/editor-unlink-button.directive.js +0 -45
- package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.js +0 -45
- package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.js +0 -45
- package/dist/es2015/tools/select-all/select-all-button.directive.js +0 -48
- package/dist/es2015/tools/shared/editor-command-base.js +0 -46
- package/dist/es2015/tools/source/editor-view-source-button.directive.js +0 -44
- package/dist/es2015/tools/tables/editor-add-column-after-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-add-column-before-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-add-row-after-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-add-row-before-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-delete-column-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-delete-row-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-delete-table-button.directive.js +0 -38
- package/dist/es2015/tools/tables/editor-merge-cells-button.directive.js +0 -40
- package/dist/es2015/tools/tables/editor-split-cell-button.directive.js +0 -40
- package/dist/es2015/tools/tools.service.js +0 -22
- package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.js +0 -45
- package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.js +0 -45
- package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -45
- package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -45
- package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -45
- package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.js +0 -45
- package/dist/fesm2015/index.js +0 -5842
- package/dist/fesm5/index.js +0 -5300
- package/dist/npm/common/active-marks.js +0 -6
- package/dist/npm/common/apply-to-word-options.js +0 -6
- package/dist/npm/common/commands.js +0 -6
- package/dist/npm/common/direction.js +0 -6
- package/dist/npm/common/error-messages.js +0 -22
- package/dist/npm/common/font-family-item.interface.js +0 -6
- package/dist/npm/common/font-size-item.interface.js +0 -6
- package/dist/npm/common/format-item.interface.js +0 -6
- package/dist/npm/common/image-data.interface.js +0 -6
- package/dist/npm/common/link-data.interface.js +0 -6
- package/dist/npm/common/paste-cleanup-settings.js +0 -6
- package/dist/npm/common/plugins-function.js +0 -6
- package/dist/npm/common/predicate.js +0 -6
- package/dist/npm/common/resizable-options.interface.js +0 -6
- package/dist/npm/common/styles.js +0 -18
- package/dist/npm/common/table-data.interface.js +0 -6
- package/dist/npm/config/command-icons.js +0 -50
- package/dist/npm/config/commands.js +0 -112
- package/dist/npm/config/schema.js +0 -21
- package/dist/npm/config/semantic-nodes.js +0 -35
- package/dist/npm/config/table-commands.js +0 -16
- package/dist/npm/config/utils.js +0 -104
- package/dist/npm/dialogs/colorpicker-dialog.component.js +0 -72
- package/dist/npm/dialogs/file-link-dialog.component.js +0 -128
- package/dist/npm/dialogs/font-family-dialog.component.js +0 -67
- package/dist/npm/dialogs/font-size-dialog.component.js +0 -67
- package/dist/npm/dialogs/format-dialog.component.js +0 -67
- package/dist/npm/dialogs/image-dialog.component.js +0 -104
- package/dist/npm/dialogs/insert-table-dialog.component.js +0 -51
- package/dist/npm/dialogs/source-dialog.component.js +0 -74
- package/dist/npm/editor-toolbar-state.js +0 -282
- package/dist/npm/editor.component.js +0 -1041
- package/dist/npm/editor.module.js +0 -243
- package/dist/npm/index.js +0 -138
- package/dist/npm/localization/custom-messages.component.js +0 -47
- package/dist/npm/localization/editor-localization.service.js +0 -26
- package/dist/npm/localization/localized-messages.directive.js +0 -38
- package/dist/npm/localization/messages.js +0 -232
- package/dist/npm/main.js +0 -38
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/preventable-events/paste-event-data.js +0 -6
- package/dist/npm/preventable-events/paste-event.js +0 -27
- package/dist/npm/tools/alignment/editor-align-center-button.directive.js +0 -49
- package/dist/npm/tools/alignment/editor-align-justify-button.directive.js +0 -49
- package/dist/npm/tools/alignment/editor-align-left-button.directive.js +0 -49
- package/dist/npm/tools/alignment/editor-align-right-button.directive.js +0 -49
- package/dist/npm/tools/blockquote/editor-blockquote-button.directive.js +0 -50
- package/dist/npm/tools/colorpicker/editor-back-color.directive.js +0 -30
- package/dist/npm/tools/colorpicker/editor-colorpicker.component.js +0 -235
- package/dist/npm/tools/colorpicker/editor-fore-color.directive.js +0 -30
- package/dist/npm/tools/editor-clean-formatting-button.directive.js +0 -48
- package/dist/npm/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -73
- package/dist/npm/tools/fontfamily/editor-fontfamily.component.js +0 -213
- package/dist/npm/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -73
- package/dist/npm/tools/fontsize/editor-fontsize.component.js +0 -208
- package/dist/npm/tools/format/editor-format-dropdownlist.component.js +0 -73
- package/dist/npm/tools/format/editor-format.component.js +0 -204
- package/dist/npm/tools/history/editor-redo-button.directive.js +0 -49
- package/dist/npm/tools/history/editor-undo-button.directive.js +0 -49
- package/dist/npm/tools/image/editor-insert-image-button.directive.js +0 -48
- package/dist/npm/tools/indentation/editor-indent-button.directive.js +0 -49
- package/dist/npm/tools/indentation/editor-outdent-button.directive.js +0 -49
- package/dist/npm/tools/link/editor-create-link-button.directive.js +0 -49
- package/dist/npm/tools/link/editor-insert-file-button.directive.js +0 -41
- package/dist/npm/tools/link/editor-unlink-button.directive.js +0 -49
- package/dist/npm/tools/list/editor-insert-ordered-list-button.directive.js +0 -49
- package/dist/npm/tools/list/editor-insert-unordered-list-button.directive.js +0 -49
- package/dist/npm/tools/print/editor-print-button.directive.js +0 -71
- package/dist/npm/tools/select-all/select-all-button.directive.js +0 -52
- package/dist/npm/tools/shared/dropdown-tool.directive.js +0 -43
- package/dist/npm/tools/shared/editor-command-base.js +0 -51
- package/dist/npm/tools/shared/editor-command-button.js +0 -36
- package/dist/npm/tools/shared/editor-command-dialog.js +0 -32
- package/dist/npm/tools/source/editor-view-source-button.directive.js +0 -48
- package/dist/npm/tools/tables/editor-add-column-after-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-add-column-before-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-add-row-after-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-add-row-before-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-delete-column-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-delete-row-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-delete-table-button.directive.js +0 -42
- package/dist/npm/tools/tables/editor-insert-table-button.component.js +0 -204
- package/dist/npm/tools/tables/editor-merge-cells-button.directive.js +0 -44
- package/dist/npm/tools/tables/editor-split-cell-button.directive.js +0 -44
- package/dist/npm/tools/tables/popup-table-grid.component.js +0 -71
- package/dist/npm/tools/tools.service.js +0 -22
- package/dist/npm/tools/typographical-emphasis/editor-bold-button.directive.js +0 -49
- package/dist/npm/tools/typographical-emphasis/editor-italic-button.directive.js +0 -49
- package/dist/npm/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -49
- package/dist/npm/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -49
- package/dist/npm/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -49
- package/dist/npm/tools/typographical-emphasis/editor-underline-button.directive.js +0 -49
- package/dist/npm/util.js +0 -130
- package/dist/systemjs/kendo-angular-editor.js +0 -5
|
@@ -1,1041 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var forms_1 = require("@angular/forms");
|
|
10
|
-
var rxjs_1 = require("rxjs");
|
|
11
|
-
var operators_1 = require("rxjs/operators");
|
|
12
|
-
var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
13
|
-
var kendo_angular_dialog_1 = require("@progress/kendo-angular-dialog");
|
|
14
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
15
|
-
var kendo_editor_common_1 = require("@progress/kendo-editor-common");
|
|
16
|
-
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
17
|
-
var package_metadata_1 = require("./package-metadata");
|
|
18
|
-
var schema_1 = require("./config/schema");
|
|
19
|
-
var commands_1 = require("./config/commands");
|
|
20
|
-
var editor_toolbar_state_1 = require("./editor-toolbar-state");
|
|
21
|
-
var util_1 = require("./util");
|
|
22
|
-
var source_dialog_component_1 = require("./dialogs/source-dialog.component");
|
|
23
|
-
var image_dialog_component_1 = require("./dialogs/image-dialog.component");
|
|
24
|
-
var file_link_dialog_component_1 = require("./dialogs/file-link-dialog.component");
|
|
25
|
-
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
26
|
-
var editor_localization_service_1 = require("./localization/editor-localization.service");
|
|
27
|
-
var styles_1 = require("./common/styles");
|
|
28
|
-
var error_messages_1 = require("./common/error-messages");
|
|
29
|
-
var tools_service_1 = require("./tools/tools.service");
|
|
30
|
-
var paste_event_1 = require("./preventable-events/paste-event");
|
|
31
|
-
var EMPTY_PARAGRAPH = '<p></p>';
|
|
32
|
-
var defaultPasteCleanupSettings = {
|
|
33
|
-
convertMsLists: false,
|
|
34
|
-
removeAttributes: [],
|
|
35
|
-
removeHtmlComments: false,
|
|
36
|
-
removeInvalidHTML: true,
|
|
37
|
-
removeMsClasses: false,
|
|
38
|
-
removeMsStyles: false,
|
|
39
|
-
stripTags: []
|
|
40
|
-
};
|
|
41
|
-
var removeCommentsIf = util_1.conditionallyExecute(kendo_editor_common_1.removeComments);
|
|
42
|
-
var removeInvalidHTMLIf = util_1.conditionallyExecute(kendo_editor_common_1.sanitize);
|
|
43
|
-
var getPasteCleanupAttributes = function (config) {
|
|
44
|
-
if (config.removeAttributes === 'all') {
|
|
45
|
-
return { '*': kendo_editor_common_1.removeAttribute };
|
|
46
|
-
}
|
|
47
|
-
var initial = util_1.removeEmptyEntries({
|
|
48
|
-
style: config.removeMsStyles ? kendo_editor_common_1.sanitizeStyleAttr : undefined,
|
|
49
|
-
class: config.removeMsClasses ? kendo_editor_common_1.sanitizeClassAttr : undefined
|
|
50
|
-
});
|
|
51
|
-
return config.removeAttributes.reduce(function (acc, curr) {
|
|
52
|
-
var _a;
|
|
53
|
-
return (tslib_1.__assign({}, acc, (_a = {}, _a[curr] = kendo_editor_common_1.removeAttribute, _a)));
|
|
54
|
-
}, initial);
|
|
55
|
-
};
|
|
56
|
-
var ɵ0 = getPasteCleanupAttributes;
|
|
57
|
-
exports.ɵ0 = ɵ0;
|
|
58
|
-
/**
|
|
59
|
-
* Represents the [Kendo UI Editor component for Angular]({% slug overview_editor %}).
|
|
60
|
-
*/
|
|
61
|
-
var EditorComponent = /** @class */ (function () {
|
|
62
|
-
function EditorComponent(dialogService, localization, cdr, ngZone, element, toolsService) {
|
|
63
|
-
var _this = this;
|
|
64
|
-
this.dialogService = dialogService;
|
|
65
|
-
this.localization = localization;
|
|
66
|
-
this.cdr = cdr;
|
|
67
|
-
this.ngZone = ngZone;
|
|
68
|
-
this.element = element;
|
|
69
|
-
this.toolsService = toolsService;
|
|
70
|
-
/**
|
|
71
|
-
* If set to `false`, the Editor will run in style non-encapsulated mode. This means
|
|
72
|
-
* that the styles of the page will be persisted in the Editor and its content will be affected by them.
|
|
73
|
-
* @default true
|
|
74
|
-
*/
|
|
75
|
-
this.iframe = true;
|
|
76
|
-
/**
|
|
77
|
-
* If set to `true` or `ApplyToWordOptions` object, commands that apply emphasis or inline styles will be applied to the whole word the cursor is in.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
this.applyToWord = false;
|
|
81
|
-
/**
|
|
82
|
-
* By default, whitespace is collapsed as per HTML's rules.
|
|
83
|
-
* Set to `true` to preserve whitespace, but normalize newlines to spaces.
|
|
84
|
-
* Set to `'full'` to preserve whitespace entirely. In this case the default ProseMirror behavior is to parse white space into nodes.
|
|
85
|
-
*
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
this.preserveWhitespace = false;
|
|
89
|
-
/**
|
|
90
|
-
* Determines whether the Editor can be resized ([see example]({% slug styling_editor %}#toc-resizable-editor)).
|
|
91
|
-
* @default false
|
|
92
|
-
*/
|
|
93
|
-
this.resizable = false;
|
|
94
|
-
/**
|
|
95
|
-
* Fires each time the value of the Editor is changed upon user interaction—
|
|
96
|
-
* for example, when the value is updated through typing in the content area or using some of the Editor tools ([see example]({% slug overview_editor %}#toc-events)).
|
|
97
|
-
* When the value of the Editor is programmatically changed through its API (`ngModel`) or form binding (`formControl`),
|
|
98
|
-
* the `valueChange` event is not triggered because it might cause a mix-up with the
|
|
99
|
-
* built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
|
|
100
|
-
*/
|
|
101
|
-
this.valueChange = new core_1.EventEmitter();
|
|
102
|
-
/**
|
|
103
|
-
* Fires when the content area of the Editor is focused ([see example]({% slug overview_editor %}#toc-events)).
|
|
104
|
-
*/
|
|
105
|
-
this.onFocus = new core_1.EventEmitter();
|
|
106
|
-
/**
|
|
107
|
-
* Fires when the user performs paste in the content area of the Editor ([see example]({% slug overview_editor %}#toc-events)).
|
|
108
|
-
* The event is preventable. If you cancel it, the Editor content will not change.
|
|
109
|
-
*/
|
|
110
|
-
this.paste = new core_1.EventEmitter();
|
|
111
|
-
/**
|
|
112
|
-
* Fires when the content area of the Editor is blurred ([see example]({% slug overview_editor %}#toc-events)).
|
|
113
|
-
*/
|
|
114
|
-
this.onBlur = new core_1.EventEmitter();
|
|
115
|
-
this.hostClass = true;
|
|
116
|
-
/**
|
|
117
|
-
* @hidden
|
|
118
|
-
*/
|
|
119
|
-
this.stateChange = new rxjs_1.BehaviorSubject(editor_toolbar_state_1.initialToolBarState);
|
|
120
|
-
/**
|
|
121
|
-
* @hidden
|
|
122
|
-
*/
|
|
123
|
-
this.valueModified = new rxjs_1.Subject();
|
|
124
|
-
this._readonly = false;
|
|
125
|
-
this._placeholder = '';
|
|
126
|
-
this.inForm = false;
|
|
127
|
-
this.afterViewInit = new rxjs_1.Subject();
|
|
128
|
-
this.contentAreaLoaded = new rxjs_1.Subject();
|
|
129
|
-
this.dispatchTransaction = function (tr) {
|
|
130
|
-
var docChanged = tr.docChanged;
|
|
131
|
-
if (_this.disabled || (_this.readonly && docChanged)) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (docChanged) {
|
|
135
|
-
var doc = tr.doc;
|
|
136
|
-
var html_1 = kendo_editor_common_1.getHtml({ doc: doc });
|
|
137
|
-
_this.trOnChange = tr;
|
|
138
|
-
_this.htmlOnChange = html_1;
|
|
139
|
-
_this.ngZone.run(function () {
|
|
140
|
-
_this.valueModified.next(html_1);
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
if (!docChanged || _this.inForm) {
|
|
144
|
-
_this.view.updateState(_this.view.state.apply(tr));
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
this.transformPastedHTML = function (dirtyHtml) {
|
|
148
|
-
var pasteCleanupSettings = tslib_1.__assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
|
|
149
|
-
var html = util_1.pipe(removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML), removeCommentsIf(pasteCleanupSettings.removeHtmlComments))(dirtyHtml);
|
|
150
|
-
var clean = kendo_editor_common_1.pasteCleanup(html, {
|
|
151
|
-
convertMsLists: pasteCleanupSettings.convertMsLists,
|
|
152
|
-
stripTags: pasteCleanupSettings.stripTags.join('|'),
|
|
153
|
-
attributes: getPasteCleanupAttributes(pasteCleanupSettings)
|
|
154
|
-
});
|
|
155
|
-
if (kendo_angular_common_1.hasObservers(_this.paste)) {
|
|
156
|
-
var event_1 = new paste_event_1.EditorPasteEvent(clean, dirtyHtml, _this._pasteEvent);
|
|
157
|
-
_this.ngZone.run(function () { return _this.paste.emit(event_1); });
|
|
158
|
-
return event_1.isDefaultPrevented() ? '' : event_1.cleanedHtml;
|
|
159
|
-
}
|
|
160
|
-
return clean;
|
|
161
|
-
};
|
|
162
|
-
this.changeValue = function (value) {
|
|
163
|
-
var prev = _this._value;
|
|
164
|
-
_this._value = value;
|
|
165
|
-
if (!_this._view) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (_this.htmlOnChange === value && _this.trOnChange) {
|
|
169
|
-
_this.view.updateState(_this.view.state.apply(_this.trOnChange));
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
if ((prev || '') !== (value || '')) {
|
|
173
|
-
var iframeContentWindowNotPresent = _this.iframe && !_this.container.element.nativeElement.contentWindow;
|
|
174
|
-
if (iframeContentWindowNotPresent) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
var state = _this.view.state;
|
|
178
|
-
var nextDoc = kendo_editor_common_1.parseContent(value || '', state.schema, { preserveWhitespace: _this.preserveWhitespace });
|
|
179
|
-
var tr = state.tr
|
|
180
|
-
.setSelection(new kendo_editor_common_1.AllSelection(state.doc))
|
|
181
|
-
.replaceSelectionWith(nextDoc);
|
|
182
|
-
_this.view.updateState(state.apply(tr));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
_this.trOnChange = null;
|
|
186
|
-
_this.htmlOnChange = null;
|
|
187
|
-
};
|
|
188
|
-
this.onChangeCallback = function (value) {
|
|
189
|
-
_this.changeValue(value);
|
|
190
|
-
};
|
|
191
|
-
this.onTouchedCallback = function (_) { }; // tslint:disable-line:no-empty
|
|
192
|
-
this.onPaste = function (_view, nativeEvent) {
|
|
193
|
-
_this._pasteEvent = nativeEvent;
|
|
194
|
-
return false;
|
|
195
|
-
};
|
|
196
|
-
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
197
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
198
|
-
// https://stackoverflow.com/questions/56572483/chrome-is-synchronously-handling-iframe-loading-whereas-firefox-handles-it-asyn
|
|
199
|
-
this.subs = rxjs_1.zip(this.afterViewInit.asObservable(), this.contentAreaLoaded.asObservable()).subscribe(function () { return _this.initialize(); });
|
|
200
|
-
}
|
|
201
|
-
EditorComponent_1 = EditorComponent;
|
|
202
|
-
Object.defineProperty(EditorComponent.prototype, "value", {
|
|
203
|
-
get: function () {
|
|
204
|
-
if (this.trOnChange) {
|
|
205
|
-
return this.htmlOnChange;
|
|
206
|
-
}
|
|
207
|
-
var value = this._view ? this.getSource() : this._value;
|
|
208
|
-
if (value === EMPTY_PARAGRAPH) {
|
|
209
|
-
return this._value ? '' : this._value;
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
212
|
-
return value;
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Sets the value of the Editor ([see example]({% slug overview_editor %}#toc-basic-usage)).
|
|
217
|
-
*/
|
|
218
|
-
set: function (value) {
|
|
219
|
-
this.changeValue(value);
|
|
220
|
-
},
|
|
221
|
-
enumerable: true,
|
|
222
|
-
configurable: true
|
|
223
|
-
});
|
|
224
|
-
Object.defineProperty(EditorComponent.prototype, "disabled", {
|
|
225
|
-
get: function () {
|
|
226
|
-
return this._disabled;
|
|
227
|
-
},
|
|
228
|
-
/**
|
|
229
|
-
* Sets the disabled state of the component.
|
|
230
|
-
*/
|
|
231
|
-
set: function (value) {
|
|
232
|
-
this._disabled = value || false;
|
|
233
|
-
if (this._view) {
|
|
234
|
-
this._view.updateState(this._view.state);
|
|
235
|
-
}
|
|
236
|
-
if (this._disabled) {
|
|
237
|
-
this.readonly = false;
|
|
238
|
-
}
|
|
239
|
-
if (this._disabled || this._readonly) {
|
|
240
|
-
this.stateChange.next(editor_toolbar_state_1.disabledToolBarState);
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
this.stateChange.next(editor_toolbar_state_1.initialToolBarState);
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
enumerable: true,
|
|
247
|
-
configurable: true
|
|
248
|
-
});
|
|
249
|
-
Object.defineProperty(EditorComponent.prototype, "readonly", {
|
|
250
|
-
get: function () {
|
|
251
|
-
return this._readonly;
|
|
252
|
-
},
|
|
253
|
-
/**
|
|
254
|
-
* Sets the read-only state of the component.
|
|
255
|
-
*/
|
|
256
|
-
set: function (value) {
|
|
257
|
-
this._readonly = value || false;
|
|
258
|
-
if (this._view) {
|
|
259
|
-
// remove DOM selection
|
|
260
|
-
var win = void 0;
|
|
261
|
-
if (this.iframe) {
|
|
262
|
-
win = this.container.element.nativeElement.contentWindow;
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
win = window;
|
|
266
|
-
}
|
|
267
|
-
var focusedNode = win.getSelection().focusNode;
|
|
268
|
-
if (this._view.dom.contains(focusedNode)) {
|
|
269
|
-
win.getSelection().removeAllRanges();
|
|
270
|
-
}
|
|
271
|
-
// remove ProseMirror selection
|
|
272
|
-
var doc = this._view.state.doc;
|
|
273
|
-
var tr = this._view.state.tr.setSelection(kendo_editor_common_1.TextSelection.create(doc, 1));
|
|
274
|
-
this._view.dispatch(tr);
|
|
275
|
-
}
|
|
276
|
-
if (this._readonly) {
|
|
277
|
-
if (this.toolbar) {
|
|
278
|
-
this.toolbar.tabindex = -1;
|
|
279
|
-
}
|
|
280
|
-
this.stateChange.next(editor_toolbar_state_1.disabledToolBarState);
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
if (this.toolbar) {
|
|
284
|
-
this.toolbar.tabindex = 0;
|
|
285
|
-
}
|
|
286
|
-
this.stateChange.next(editor_toolbar_state_1.initialToolBarState);
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
enumerable: true,
|
|
290
|
-
configurable: true
|
|
291
|
-
});
|
|
292
|
-
Object.defineProperty(EditorComponent.prototype, "schema", {
|
|
293
|
-
get: function () {
|
|
294
|
-
return this._schema;
|
|
295
|
-
},
|
|
296
|
-
/**
|
|
297
|
-
* Allows providing a custom schema. ([see example]({% slug schema_editor %}))
|
|
298
|
-
*/
|
|
299
|
-
set: function (value) {
|
|
300
|
-
if (core_1.isDevMode) {
|
|
301
|
-
if (!(value instanceof kendo_editor_common_1.Schema)) {
|
|
302
|
-
throw new Error(error_messages_1.EditorErrorMessages.schemaType);
|
|
303
|
-
}
|
|
304
|
-
if (this._view) {
|
|
305
|
-
throw new Error(error_messages_1.EditorErrorMessages.setSchemaOnce);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
this._schema = value;
|
|
309
|
-
},
|
|
310
|
-
enumerable: true,
|
|
311
|
-
configurable: true
|
|
312
|
-
});
|
|
313
|
-
Object.defineProperty(EditorComponent.prototype, "plugins", {
|
|
314
|
-
get: function () {
|
|
315
|
-
return this._plugins;
|
|
316
|
-
},
|
|
317
|
-
/**
|
|
318
|
-
* Defines a function which determines the plugins that will be used when initializing the Editor.
|
|
319
|
-
* It exposes the default plugins collection as an argument, and returns
|
|
320
|
-
* the plugins collection that will be used when creating the Editor component. ([see example]({% slug plugins_editor %}))
|
|
321
|
-
*
|
|
322
|
-
* ```ts-no-run
|
|
323
|
-
* pluginsCallback(defaultPlugins: Plugin[]): Plugin[] {
|
|
324
|
-
* const myPlugin = new Plugin({/custom plugin code/});
|
|
325
|
-
* return [...defaultPlugins, myPlugin];
|
|
326
|
-
* }
|
|
327
|
-
* ```
|
|
328
|
-
*/
|
|
329
|
-
set: function (fn) {
|
|
330
|
-
if (core_1.isDevMode) {
|
|
331
|
-
if (typeof fn !== 'function') {
|
|
332
|
-
throw new Error(error_messages_1.EditorErrorMessages.pluginsCallbackType(fn));
|
|
333
|
-
}
|
|
334
|
-
if (this._view) {
|
|
335
|
-
throw new Error(error_messages_1.EditorErrorMessages.setPluginsOnce);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
this._plugins = fn;
|
|
339
|
-
},
|
|
340
|
-
enumerable: true,
|
|
341
|
-
configurable: true
|
|
342
|
-
});
|
|
343
|
-
Object.defineProperty(EditorComponent.prototype, "placeholder", {
|
|
344
|
-
get: function () {
|
|
345
|
-
return this._placeholder;
|
|
346
|
-
},
|
|
347
|
-
/**
|
|
348
|
-
* The hint, which is displayed when the component is empty.
|
|
349
|
-
*/
|
|
350
|
-
set: function (value) {
|
|
351
|
-
if (core_1.isDevMode && this._view) {
|
|
352
|
-
throw new Error(error_messages_1.EditorErrorMessages.setPlaceHolderOnce);
|
|
353
|
-
}
|
|
354
|
-
this._placeholder = value;
|
|
355
|
-
},
|
|
356
|
-
enumerable: true,
|
|
357
|
-
configurable: true
|
|
358
|
-
});
|
|
359
|
-
Object.defineProperty(EditorComponent.prototype, "resizableClass", {
|
|
360
|
-
get: function () {
|
|
361
|
-
return !!this.resizable;
|
|
362
|
-
},
|
|
363
|
-
enumerable: true,
|
|
364
|
-
configurable: true
|
|
365
|
-
});
|
|
366
|
-
Object.defineProperty(EditorComponent.prototype, "isDisabled", {
|
|
367
|
-
get: function () {
|
|
368
|
-
return this.disabled;
|
|
369
|
-
},
|
|
370
|
-
enumerable: true,
|
|
371
|
-
configurable: true
|
|
372
|
-
});
|
|
373
|
-
Object.defineProperty(EditorComponent.prototype, "isReadonly", {
|
|
374
|
-
get: function () {
|
|
375
|
-
return this.readonly;
|
|
376
|
-
},
|
|
377
|
-
enumerable: true,
|
|
378
|
-
configurable: true
|
|
379
|
-
});
|
|
380
|
-
Object.defineProperty(EditorComponent.prototype, "isIE", {
|
|
381
|
-
get: function () {
|
|
382
|
-
return this.iframe && util_1.detectIE();
|
|
383
|
-
},
|
|
384
|
-
enumerable: true,
|
|
385
|
-
configurable: true
|
|
386
|
-
});
|
|
387
|
-
Object.defineProperty(EditorComponent.prototype, "dir", {
|
|
388
|
-
get: function () {
|
|
389
|
-
return this.direction;
|
|
390
|
-
},
|
|
391
|
-
enumerable: true,
|
|
392
|
-
configurable: true
|
|
393
|
-
});
|
|
394
|
-
Object.defineProperty(EditorComponent.prototype, "ariaDisabled", {
|
|
395
|
-
get: function () {
|
|
396
|
-
return this.disabled;
|
|
397
|
-
},
|
|
398
|
-
enumerable: true,
|
|
399
|
-
configurable: true
|
|
400
|
-
});
|
|
401
|
-
Object.defineProperty(EditorComponent.prototype, "minWidth", {
|
|
402
|
-
get: function () {
|
|
403
|
-
var resizableOptions = this.resizable;
|
|
404
|
-
return resizableOptions.minWidth ? resizableOptions.minWidth + 'px' : undefined;
|
|
405
|
-
},
|
|
406
|
-
enumerable: true,
|
|
407
|
-
configurable: true
|
|
408
|
-
});
|
|
409
|
-
Object.defineProperty(EditorComponent.prototype, "maxWidth", {
|
|
410
|
-
get: function () {
|
|
411
|
-
var resizableOptions = this.resizable;
|
|
412
|
-
return resizableOptions.maxWidth ? resizableOptions.maxWidth + 'px' : undefined;
|
|
413
|
-
},
|
|
414
|
-
enumerable: true,
|
|
415
|
-
configurable: true
|
|
416
|
-
});
|
|
417
|
-
Object.defineProperty(EditorComponent.prototype, "minHeight", {
|
|
418
|
-
get: function () {
|
|
419
|
-
var resizableOptions = this.resizable;
|
|
420
|
-
return resizableOptions.minHeight ? resizableOptions.minHeight + 'px' : undefined;
|
|
421
|
-
},
|
|
422
|
-
enumerable: true,
|
|
423
|
-
configurable: true
|
|
424
|
-
});
|
|
425
|
-
Object.defineProperty(EditorComponent.prototype, "maxHeight", {
|
|
426
|
-
get: function () {
|
|
427
|
-
var resizableOptions = this.resizable;
|
|
428
|
-
return resizableOptions.maxHeight ? resizableOptions.maxHeight + 'px' : undefined;
|
|
429
|
-
},
|
|
430
|
-
enumerable: true,
|
|
431
|
-
configurable: true
|
|
432
|
-
});
|
|
433
|
-
Object.defineProperty(EditorComponent.prototype, "toolbar", {
|
|
434
|
-
get: function () {
|
|
435
|
-
return this.defaultToolbarComponent || this.userToolBarComponent;
|
|
436
|
-
},
|
|
437
|
-
enumerable: true,
|
|
438
|
-
configurable: true
|
|
439
|
-
});
|
|
440
|
-
Object.defineProperty(EditorComponent.prototype, "view", {
|
|
441
|
-
/**
|
|
442
|
-
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
|
|
443
|
-
* that manages the DOM structure that represents an editable document.
|
|
444
|
-
*/
|
|
445
|
-
get: function () {
|
|
446
|
-
return this._view;
|
|
447
|
-
},
|
|
448
|
-
enumerable: true,
|
|
449
|
-
configurable: true
|
|
450
|
-
});
|
|
451
|
-
Object.defineProperty(EditorComponent.prototype, "selectionText", {
|
|
452
|
-
/**
|
|
453
|
-
* Returns the text which the current Editor selection contains ([see example]({% slug selection_editor %}#toc-retrieve-the-selected-text)).
|
|
454
|
-
*/
|
|
455
|
-
get: function () {
|
|
456
|
-
return this._view && this._view.state ? kendo_editor_common_1.getSelectionText(this._view.state) : '';
|
|
457
|
-
},
|
|
458
|
-
enumerable: true,
|
|
459
|
-
configurable: true
|
|
460
|
-
});
|
|
461
|
-
EditorComponent.prototype.ngOnInit = function () {
|
|
462
|
-
var _this = this;
|
|
463
|
-
this.subs.add(this.localization.changes.subscribe(function (_a) {
|
|
464
|
-
var rtl = _a.rtl;
|
|
465
|
-
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
466
|
-
}));
|
|
467
|
-
this.subs.add(this.toolsService.needsCheck.subscribe(function () { return _this.cdr.markForCheck(); }));
|
|
468
|
-
};
|
|
469
|
-
EditorComponent.prototype.ngAfterViewInit = function () {
|
|
470
|
-
this.afterViewInit.next();
|
|
471
|
-
if (!this.iframe) {
|
|
472
|
-
this.contentAreaLoaded.next();
|
|
473
|
-
}
|
|
474
|
-
if (this.resizable) {
|
|
475
|
-
this.normalizeSize();
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
EditorComponent.prototype.ngOnChanges = function (changes) {
|
|
479
|
-
var _this = this;
|
|
480
|
-
if (changes.value && this.view) {
|
|
481
|
-
this.changeValue(changes.value.currentValue);
|
|
482
|
-
}
|
|
483
|
-
if (changes.iframe && !changes.iframe.isFirstChange()) {
|
|
484
|
-
this.ngZone.onStable.pipe(operators_1.take(1)).subscribe(function () { return _this.initialize(); });
|
|
485
|
-
}
|
|
486
|
-
if (changes.resizable && !changes.resizable.isFirstChange()) {
|
|
487
|
-
this.normalizeSize();
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* @hidden
|
|
492
|
-
*/
|
|
493
|
-
EditorComponent.prototype.setDisabledState = function (isDisabled) {
|
|
494
|
-
this.disabled = isDisabled;
|
|
495
|
-
};
|
|
496
|
-
/**
|
|
497
|
-
* @hidden
|
|
498
|
-
*/
|
|
499
|
-
EditorComponent.prototype.iframeOnLoad = function () {
|
|
500
|
-
this.contentAreaLoaded.next();
|
|
501
|
-
};
|
|
502
|
-
/**
|
|
503
|
-
* Executes a command on the currently selected text
|
|
504
|
-
* ([more information and example]({% slug toolbartools_editor %}#toc-custom-tools)).
|
|
505
|
-
*
|
|
506
|
-
* @param {EditorCommand} commandName - The command that will be executed.
|
|
507
|
-
* @param {any} attr - Optional parameters for the command. Apart from the following list,
|
|
508
|
-
* the parameters do not expect specific attributes when you call them:
|
|
509
|
-
* - `format` - Accepts an object with the `tag` property.
|
|
510
|
-
* The supported tags are `p` and any of the `h1` to `h6` heading tags.
|
|
511
|
-
* - `createLink` - Accepts an object with the `href`, `title`, and `target` properties. The `href` property is mandatory.
|
|
512
|
-
* - `setHTML` - Accepts a `string` parameter.
|
|
513
|
-
* - `insertTable` - Accepts an object with the `rows` and `cols` properties. The number values are zero based.
|
|
514
|
-
*
|
|
515
|
-
* @example
|
|
516
|
-
* ```ts-no-run
|
|
517
|
-
* // Toggles the bold styling.
|
|
518
|
-
* editor.exec('bold');
|
|
519
|
-
*
|
|
520
|
-
* // Creates a bullet list.
|
|
521
|
-
* editor.exec('insertUnorderedList');
|
|
522
|
-
*
|
|
523
|
-
* // Creates a link.
|
|
524
|
-
* editor.exec('createLink', { href: 'www.progress.com', title: 'Progress', target: 'window' });
|
|
525
|
-
*
|
|
526
|
-
* // Inserts a file.
|
|
527
|
-
* editor.exec('insertFile', { href: 'www.progress.com/resources/myfile.doc', title: 'My file', target: 'window' });
|
|
528
|
-
*
|
|
529
|
-
* // Inserts a image.
|
|
530
|
-
* editor.exec('insertImage', { src: 'www.progress.com/resources/logo.jpg', title: 'Progress', target: 'window' });
|
|
531
|
-
*
|
|
532
|
-
* // Inserts a text at a given position. If no position is specified, the text will be inserted after the cursor.
|
|
533
|
-
* editor.exec('insertText', { text: 'Hello World!', from: 0, to: 0 });
|
|
534
|
-
*
|
|
535
|
-
* // Changes the format of a text block.
|
|
536
|
-
* editor.exec('format', { tag: 'h2' });
|
|
537
|
-
*
|
|
538
|
-
* // Changes the font size of the selected text.
|
|
539
|
-
* editor.exec('fontSize', 24);
|
|
540
|
-
*
|
|
541
|
-
* // Changes the content of the Editor.
|
|
542
|
-
* editor.exec('setHTML', '<p>HTML content</p>');
|
|
543
|
-
*
|
|
544
|
-
* // Creates and inserts a table with the specified number of rows and columns. Numbers are zero based.
|
|
545
|
-
* this.editor.exec("insertTable", { rows: 3, cols: 5 });
|
|
546
|
-
* ```
|
|
547
|
-
*/
|
|
548
|
-
EditorComponent.prototype.exec = function (commandName, attr) {
|
|
549
|
-
// normalizes setHTML attributes
|
|
550
|
-
if (commandName === 'setHTML' && typeof attr === 'string') {
|
|
551
|
-
attr = {
|
|
552
|
-
content: attr,
|
|
553
|
-
parseOptions: {
|
|
554
|
-
preserveWhitespace: this.preserveWhitespace
|
|
555
|
-
}
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
else if (['fontFamily', 'fontSize', 'foreColor', 'backColor', 'createLink'].some(function (name) { return name === commandName; })) {
|
|
559
|
-
attr = {
|
|
560
|
-
value: attr,
|
|
561
|
-
applyToWord: this.applyToWord
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
// Finds a command and applies the attributes.
|
|
565
|
-
var command = commands_1.editorCommands[commandName](attr);
|
|
566
|
-
// Executes a ProseMirror command.
|
|
567
|
-
command(this._view.state, this._view.dispatch, this._view);
|
|
568
|
-
};
|
|
569
|
-
/**
|
|
570
|
-
* Opens a dialog.
|
|
571
|
-
* @param {DialogCommand} dialogName - The name of the dialog that will open.
|
|
572
|
-
*
|
|
573
|
-
* The supported values are:
|
|
574
|
-
* * `createLink`
|
|
575
|
-
* * `viewSource`
|
|
576
|
-
* * `insertFile`
|
|
577
|
-
* * `insertImage`
|
|
578
|
-
* * `tableWizard`
|
|
579
|
-
*
|
|
580
|
-
* @example
|
|
581
|
-
* ```ts-no-run
|
|
582
|
-
* // Opens a `createLink` dialog.
|
|
583
|
-
* editor.openDialog('createLink');
|
|
584
|
-
*
|
|
585
|
-
* // Opens a `viewSource` dialog.
|
|
586
|
-
* editor.openDialog('viewSource');
|
|
587
|
-
* ```
|
|
588
|
-
*/
|
|
589
|
-
EditorComponent.prototype.openDialog = function (dialogName) {
|
|
590
|
-
var editorDialogs = {
|
|
591
|
-
createLink: {
|
|
592
|
-
content: file_link_dialog_component_1.FileLinkDialogComponent
|
|
593
|
-
},
|
|
594
|
-
insertFile: {
|
|
595
|
-
content: file_link_dialog_component_1.FileLinkDialogComponent
|
|
596
|
-
},
|
|
597
|
-
insertImage: {
|
|
598
|
-
content: image_dialog_component_1.ImageDialogComponent
|
|
599
|
-
},
|
|
600
|
-
viewSource: {
|
|
601
|
-
content: source_dialog_component_1.SourceDialogComponent,
|
|
602
|
-
height: 400,
|
|
603
|
-
width: 500
|
|
604
|
-
}
|
|
605
|
-
// tableWizard: {
|
|
606
|
-
// content: TableWizardDialogComponent
|
|
607
|
-
// }
|
|
608
|
-
};
|
|
609
|
-
var dialog = Object.assign({ appendTo: this.dialogContainer }, editorDialogs[dialogName]);
|
|
610
|
-
this.toolbar.toggle(false);
|
|
611
|
-
var dialogContent = this.dialogService.open(dialog).content.instance;
|
|
612
|
-
if (dialogName === 'createLink' || dialogName === 'insertFile') {
|
|
613
|
-
dialogContent.command = dialogName;
|
|
614
|
-
}
|
|
615
|
-
dialogContent.editor = this;
|
|
616
|
-
dialogContent.setData(this._view.state, { applyToWord: this.applyToWord });
|
|
617
|
-
};
|
|
618
|
-
/**
|
|
619
|
-
* Manually focus the Editor.
|
|
620
|
-
*/
|
|
621
|
-
EditorComponent.prototype.focus = function () {
|
|
622
|
-
this.focusChangedProgrammatically = true;
|
|
623
|
-
this._view.focus();
|
|
624
|
-
this.focusChangedProgrammatically = false;
|
|
625
|
-
};
|
|
626
|
-
/**
|
|
627
|
-
* Manually blur the Editor.
|
|
628
|
-
*/
|
|
629
|
-
EditorComponent.prototype.blur = function () {
|
|
630
|
-
this.focusChangedProgrammatically = true;
|
|
631
|
-
this._view.dom.blur();
|
|
632
|
-
this.focusChangedProgrammatically = false;
|
|
633
|
-
};
|
|
634
|
-
/**
|
|
635
|
-
* @hidden
|
|
636
|
-
*/
|
|
637
|
-
EditorComponent.prototype.getSource = function () {
|
|
638
|
-
return kendo_editor_common_1.getHtml(this._view.state);
|
|
639
|
-
};
|
|
640
|
-
EditorComponent.prototype.ngOnDestroy = function () {
|
|
641
|
-
if (this.subs) {
|
|
642
|
-
this.subs.unsubscribe();
|
|
643
|
-
}
|
|
644
|
-
if (this._styleObserver) {
|
|
645
|
-
this._styleObserver.disconnect();
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
/**
|
|
649
|
-
* @hidden
|
|
650
|
-
*/
|
|
651
|
-
EditorComponent.prototype.writeValue = function (value) {
|
|
652
|
-
this.inForm = true;
|
|
653
|
-
// To avoid confusion, non-existent values are always undefined.
|
|
654
|
-
this.value = value === null ? undefined : value;
|
|
655
|
-
};
|
|
656
|
-
/**
|
|
657
|
-
* @hidden
|
|
658
|
-
*/
|
|
659
|
-
EditorComponent.prototype.registerOnChange = function (fn) {
|
|
660
|
-
this.onChangeCallback = fn;
|
|
661
|
-
};
|
|
662
|
-
/**
|
|
663
|
-
* @hidden
|
|
664
|
-
*/
|
|
665
|
-
EditorComponent.prototype.registerOnTouched = function (fn) {
|
|
666
|
-
this.onTouchedCallback = fn;
|
|
667
|
-
};
|
|
668
|
-
/**
|
|
669
|
-
* @hidden
|
|
670
|
-
* Used by the TextBoxContainer to determine if the component is empty.
|
|
671
|
-
*/
|
|
672
|
-
EditorComponent.prototype.isEmpty = function () {
|
|
673
|
-
return false;
|
|
674
|
-
};
|
|
675
|
-
EditorComponent.prototype.initialize = function () {
|
|
676
|
-
var _this = this;
|
|
677
|
-
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
var currentSchema = this.schema || schema_1.schema;
|
|
681
|
-
var containerNativeElement = this.container.element.nativeElement;
|
|
682
|
-
var contentNode = kendo_editor_common_1.parseContent((this.value || '').trim(), currentSchema, { preserveWhitespace: this.preserveWhitespace });
|
|
683
|
-
if (this.iframe) {
|
|
684
|
-
var iframeDoc_1 = containerNativeElement.contentDocument;
|
|
685
|
-
var meta = iframeDoc_1.createElement('meta');
|
|
686
|
-
meta.setAttribute('charset', 'utf-8');
|
|
687
|
-
iframeDoc_1.head.appendChild(meta);
|
|
688
|
-
[styles_1.defaultStyle, styles_1.tablesStyles, this.dir === 'rtl' ? styles_1.rtlStyles : undefined].forEach(function (styles) {
|
|
689
|
-
if (styles) {
|
|
690
|
-
var style = iframeDoc_1.createElement('style');
|
|
691
|
-
style.appendChild(iframeDoc_1.createTextNode(styles));
|
|
692
|
-
iframeDoc_1.head.appendChild(style);
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
var element = iframeDoc_1.createElement('div');
|
|
696
|
-
element.classList.add('k-content');
|
|
697
|
-
iframeDoc_1.body.appendChild(element);
|
|
698
|
-
}
|
|
699
|
-
else {
|
|
700
|
-
var element = document.createElement('div');
|
|
701
|
-
containerNativeElement.appendChild(element);
|
|
702
|
-
}
|
|
703
|
-
var defaultPlugins = [
|
|
704
|
-
new kendo_editor_common_1.Plugin({
|
|
705
|
-
key: new kendo_editor_common_1.PluginKey('editor-tabindex'),
|
|
706
|
-
props: {
|
|
707
|
-
attributes: function () { return ({
|
|
708
|
-
// set tabindex when contenteditable is false, so that the content area can be selected
|
|
709
|
-
tabIndex: _this.readonly ? '0' : ''
|
|
710
|
-
}); }
|
|
711
|
-
}
|
|
712
|
-
}),
|
|
713
|
-
new kendo_editor_common_1.Plugin({
|
|
714
|
-
key: new kendo_editor_common_1.PluginKey('toolbar-tools-update'),
|
|
715
|
-
view: function () { return ({
|
|
716
|
-
update: function (editorView) {
|
|
717
|
-
if (!_this.disabled) {
|
|
718
|
-
_this.stateChange.next(_this.readonly ? editor_toolbar_state_1.disabledToolBarState : editor_toolbar_state_1.getToolbarState(editorView.state, { applyToWord: _this.applyToWord }));
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
}); }
|
|
722
|
-
}),
|
|
723
|
-
kendo_editor_common_1.history(),
|
|
724
|
-
kendo_editor_common_1.keymap(kendo_editor_common_1.buildListKeymap(currentSchema)),
|
|
725
|
-
kendo_editor_common_1.keymap(kendo_editor_common_1.buildKeymap(currentSchema, { applyToWord: this.applyToWord })),
|
|
726
|
-
kendo_editor_common_1.keymap(kendo_editor_common_1.baseKeymap),
|
|
727
|
-
kendo_editor_common_1.gapCursor(),
|
|
728
|
-
kendo_editor_common_1.imageResizing(),
|
|
729
|
-
kendo_editor_common_1.tableEditing(),
|
|
730
|
-
kendo_editor_common_1.caretColor()
|
|
731
|
-
];
|
|
732
|
-
if (this.placeholder) {
|
|
733
|
-
defaultPlugins.push(kendo_editor_common_1.placeholder(this.placeholder));
|
|
734
|
-
}
|
|
735
|
-
var state = kendo_editor_common_1.EditorState.create({
|
|
736
|
-
schema: currentSchema,
|
|
737
|
-
doc: contentNode,
|
|
738
|
-
plugins: util_1.isPresent(this.plugins) ? this.plugins(defaultPlugins) : defaultPlugins
|
|
739
|
-
});
|
|
740
|
-
if (this.iframe) {
|
|
741
|
-
this.viewMountElement = containerNativeElement.contentDocument.querySelector('div');
|
|
742
|
-
}
|
|
743
|
-
else {
|
|
744
|
-
this.viewMountElement = containerNativeElement.querySelector('div');
|
|
745
|
-
}
|
|
746
|
-
this.ngZone.runOutsideAngular(function () {
|
|
747
|
-
_this._view = new kendo_editor_common_1.EditorView({ mount: _this.viewMountElement }, {
|
|
748
|
-
state: state,
|
|
749
|
-
editable: function () { return !_this.readonly; },
|
|
750
|
-
dispatchTransaction: _this.dispatchTransaction,
|
|
751
|
-
transformPastedHTML: _this.transformPastedHTML,
|
|
752
|
-
handleDOMEvents: {
|
|
753
|
-
paste: _this.onPaste
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
});
|
|
757
|
-
if (this._view) {
|
|
758
|
-
var containerElement = void 0;
|
|
759
|
-
var contentAreaClasslist_1 = this.element.nativeElement.querySelector('.k-editor-content').classList;
|
|
760
|
-
if (this.iframe) {
|
|
761
|
-
containerElement = this.container.element.nativeElement.contentDocument;
|
|
762
|
-
}
|
|
763
|
-
else {
|
|
764
|
-
containerElement = this.container.element.nativeElement;
|
|
765
|
-
}
|
|
766
|
-
this.subs.add(rxjs_1.fromEvent(containerElement, 'focusin')
|
|
767
|
-
.subscribe(function (e) {
|
|
768
|
-
if (_this.readonly) {
|
|
769
|
-
contentAreaClasslist_1.add('k-focus');
|
|
770
|
-
}
|
|
771
|
-
if (!_this.focusChangedProgrammatically || _this.shouldEmitFocus) {
|
|
772
|
-
var relatedTarget = e.relatedTarget;
|
|
773
|
-
var isActiveColorButton = relatedTarget && relatedTarget.classList.contains('k-colorpicker');
|
|
774
|
-
if (!isActiveColorButton || _this.shouldEmitFocus) {
|
|
775
|
-
_this.ngZone.run(function () { return _this.onFocus.emit(); });
|
|
776
|
-
}
|
|
777
|
-
_this.shouldEmitFocus = false;
|
|
778
|
-
}
|
|
779
|
-
}));
|
|
780
|
-
this.subs.add(rxjs_1.fromEvent(containerElement, 'focusout')
|
|
781
|
-
.subscribe(function (e) {
|
|
782
|
-
if (_this.readonly) {
|
|
783
|
-
contentAreaClasslist_1.remove('k-focus');
|
|
784
|
-
}
|
|
785
|
-
if (!_this.focusChangedProgrammatically) {
|
|
786
|
-
var relatedTarget = e.relatedTarget;
|
|
787
|
-
var isActiveColorButton = relatedTarget && relatedTarget.classList.contains('k-colorpicker');
|
|
788
|
-
if (!isActiveColorButton) {
|
|
789
|
-
_this.ngZone.run(function () { return _this.onBlur.emit(); });
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}));
|
|
793
|
-
}
|
|
794
|
-
this.subs.add(this.stateChange.subscribe(function () {
|
|
795
|
-
if (_this.userToolBarComponent) {
|
|
796
|
-
_this.userToolBarComponent.cdr.detectChanges();
|
|
797
|
-
}
|
|
798
|
-
else {
|
|
799
|
-
_this.cdr.detectChanges();
|
|
800
|
-
}
|
|
801
|
-
}));
|
|
802
|
-
this.subs.add(this.valueModified.subscribe(function (value) {
|
|
803
|
-
_this.onChangeCallback(value);
|
|
804
|
-
_this.valueChange.emit(value);
|
|
805
|
-
_this.cdr.markForCheck();
|
|
806
|
-
}));
|
|
807
|
-
this.subs.add(rxjs_1.fromEvent(this.viewMountElement, 'keyup')
|
|
808
|
-
.pipe(operators_1.map(function (e) { return e.keyCode; }), operators_1.filter(function (code) { return code === 121; }), // F10
|
|
809
|
-
operators_1.map(function () { return _this.userToolBarElement || _this.defaultToolbar; }))
|
|
810
|
-
.subscribe(function (toolbar) { return toolbar.nativeElement.focus(); }));
|
|
811
|
-
this.subs.add(rxjs_1.fromEvent(this.viewMountElement, 'blur')
|
|
812
|
-
.pipe(operators_1.filter(function (event) { return !_this.viewMountElement.contains(event.relatedTarget); }))
|
|
813
|
-
.subscribe(function () { return _this.onTouchedCallback(); }));
|
|
814
|
-
};
|
|
815
|
-
EditorComponent.prototype.normalizeSize = function () {
|
|
816
|
-
var _this = this;
|
|
817
|
-
if (typeof this.resizable === 'object' && !this._styleObserver) {
|
|
818
|
-
var element_1 = this.element.nativeElement;
|
|
819
|
-
this._styleObserver = new MutationObserver(function () {
|
|
820
|
-
_this.ngZone.runOutsideAngular(function () { return _this.normalizeProperties(element_1); });
|
|
821
|
-
});
|
|
822
|
-
this._styleObserver.observe(element_1, { attributeFilter: ['style'] });
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
EditorComponent.prototype.normalizeProperties = function (element) {
|
|
826
|
-
var props = Object.keys(this.resizable);
|
|
827
|
-
var pixelWidth = parseInt(element.style.width, 10);
|
|
828
|
-
var pixelHeight = parseInt(element.style.height, 10);
|
|
829
|
-
var resizable = this.resizable;
|
|
830
|
-
props.forEach(function (prop) {
|
|
831
|
-
var isMinProp = prop.startsWith('min');
|
|
832
|
-
var isMaxProp = !isMinProp;
|
|
833
|
-
var isWidthProp = prop.endsWith('Width');
|
|
834
|
-
var isHeightProp = !isWidthProp;
|
|
835
|
-
if (isMinProp && isWidthProp) {
|
|
836
|
-
if (pixelWidth < resizable.minWidth) {
|
|
837
|
-
element.style.width = resizable.minWidth + 'px';
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
else if (isMinProp && isHeightProp) {
|
|
841
|
-
if (pixelHeight < resizable.minHeight) {
|
|
842
|
-
element.style.height = resizable.minHeight + 'px';
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
else if (isMaxProp && isWidthProp) {
|
|
846
|
-
if (pixelWidth > resizable.maxWidth) {
|
|
847
|
-
element.style.width = resizable.maxWidth + 'px';
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
else {
|
|
851
|
-
if (pixelHeight > resizable.maxHeight) {
|
|
852
|
-
element.style.height = resizable.maxHeight + 'px';
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
};
|
|
857
|
-
var EditorComponent_1;
|
|
858
|
-
tslib_1.__decorate([
|
|
859
|
-
core_1.Input(),
|
|
860
|
-
tslib_1.__metadata("design:type", String),
|
|
861
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
862
|
-
], EditorComponent.prototype, "value", null);
|
|
863
|
-
tslib_1.__decorate([
|
|
864
|
-
core_1.Input(),
|
|
865
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
866
|
-
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
867
|
-
], EditorComponent.prototype, "disabled", null);
|
|
868
|
-
tslib_1.__decorate([
|
|
869
|
-
core_1.Input(),
|
|
870
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
871
|
-
tslib_1.__metadata("design:paramtypes", [Boolean])
|
|
872
|
-
], EditorComponent.prototype, "readonly", null);
|
|
873
|
-
tslib_1.__decorate([
|
|
874
|
-
core_1.Input(),
|
|
875
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
876
|
-
], EditorComponent.prototype, "iframe", void 0);
|
|
877
|
-
tslib_1.__decorate([
|
|
878
|
-
core_1.Input(),
|
|
879
|
-
tslib_1.__metadata("design:type", Object)
|
|
880
|
-
], EditorComponent.prototype, "applyToWord", void 0);
|
|
881
|
-
tslib_1.__decorate([
|
|
882
|
-
core_1.Input(),
|
|
883
|
-
tslib_1.__metadata("design:type", kendo_editor_common_1.Schema),
|
|
884
|
-
tslib_1.__metadata("design:paramtypes", [kendo_editor_common_1.Schema])
|
|
885
|
-
], EditorComponent.prototype, "schema", null);
|
|
886
|
-
tslib_1.__decorate([
|
|
887
|
-
core_1.Input(),
|
|
888
|
-
tslib_1.__metadata("design:type", Function),
|
|
889
|
-
tslib_1.__metadata("design:paramtypes", [Function])
|
|
890
|
-
], EditorComponent.prototype, "plugins", null);
|
|
891
|
-
tslib_1.__decorate([
|
|
892
|
-
core_1.Input(),
|
|
893
|
-
tslib_1.__metadata("design:type", String),
|
|
894
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
895
|
-
], EditorComponent.prototype, "placeholder", null);
|
|
896
|
-
tslib_1.__decorate([
|
|
897
|
-
core_1.Input(),
|
|
898
|
-
tslib_1.__metadata("design:type", Object)
|
|
899
|
-
], EditorComponent.prototype, "preserveWhitespace", void 0);
|
|
900
|
-
tslib_1.__decorate([
|
|
901
|
-
core_1.Input(),
|
|
902
|
-
tslib_1.__metadata("design:type", Object)
|
|
903
|
-
], EditorComponent.prototype, "pasteCleanupSettings", void 0);
|
|
904
|
-
tslib_1.__decorate([
|
|
905
|
-
core_1.Input(),
|
|
906
|
-
tslib_1.__metadata("design:type", Object)
|
|
907
|
-
], EditorComponent.prototype, "resizable", void 0);
|
|
908
|
-
tslib_1.__decorate([
|
|
909
|
-
core_1.Output(),
|
|
910
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
911
|
-
], EditorComponent.prototype, "valueChange", void 0);
|
|
912
|
-
tslib_1.__decorate([
|
|
913
|
-
core_1.Output('focus'),
|
|
914
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
915
|
-
], EditorComponent.prototype, "onFocus", void 0);
|
|
916
|
-
tslib_1.__decorate([
|
|
917
|
-
core_1.Output(),
|
|
918
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
919
|
-
], EditorComponent.prototype, "paste", void 0);
|
|
920
|
-
tslib_1.__decorate([
|
|
921
|
-
core_1.Output('blur'),
|
|
922
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
923
|
-
], EditorComponent.prototype, "onBlur", void 0);
|
|
924
|
-
tslib_1.__decorate([
|
|
925
|
-
core_1.HostBinding('class.k-editor'),
|
|
926
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
927
|
-
], EditorComponent.prototype, "hostClass", void 0);
|
|
928
|
-
tslib_1.__decorate([
|
|
929
|
-
core_1.HostBinding('class.k-editor-resizable'),
|
|
930
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
931
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
932
|
-
], EditorComponent.prototype, "resizableClass", null);
|
|
933
|
-
tslib_1.__decorate([
|
|
934
|
-
core_1.HostBinding('class.k-disabled'),
|
|
935
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
936
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
937
|
-
], EditorComponent.prototype, "isDisabled", null);
|
|
938
|
-
tslib_1.__decorate([
|
|
939
|
-
core_1.HostBinding('class.k-readonly'),
|
|
940
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
941
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
942
|
-
], EditorComponent.prototype, "isReadonly", null);
|
|
943
|
-
tslib_1.__decorate([
|
|
944
|
-
core_1.HostBinding('class.k-ie'),
|
|
945
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
946
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
947
|
-
], EditorComponent.prototype, "isIE", null);
|
|
948
|
-
tslib_1.__decorate([
|
|
949
|
-
core_1.HostBinding('attr.dir'),
|
|
950
|
-
tslib_1.__metadata("design:type", String),
|
|
951
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
952
|
-
], EditorComponent.prototype, "dir", null);
|
|
953
|
-
tslib_1.__decorate([
|
|
954
|
-
core_1.HostBinding('attr.ariaDisabled'),
|
|
955
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
956
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
957
|
-
], EditorComponent.prototype, "ariaDisabled", null);
|
|
958
|
-
tslib_1.__decorate([
|
|
959
|
-
core_1.HostBinding('style.minWidth'),
|
|
960
|
-
tslib_1.__metadata("design:type", String),
|
|
961
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
962
|
-
], EditorComponent.prototype, "minWidth", null);
|
|
963
|
-
tslib_1.__decorate([
|
|
964
|
-
core_1.HostBinding('style.maxWidth'),
|
|
965
|
-
tslib_1.__metadata("design:type", String),
|
|
966
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
967
|
-
], EditorComponent.prototype, "maxWidth", null);
|
|
968
|
-
tslib_1.__decorate([
|
|
969
|
-
core_1.HostBinding('style.minHeight'),
|
|
970
|
-
tslib_1.__metadata("design:type", String),
|
|
971
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
972
|
-
], EditorComponent.prototype, "minHeight", null);
|
|
973
|
-
tslib_1.__decorate([
|
|
974
|
-
core_1.HostBinding('style.maxHeight'),
|
|
975
|
-
tslib_1.__metadata("design:type", String),
|
|
976
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
977
|
-
], EditorComponent.prototype, "maxHeight", null);
|
|
978
|
-
tslib_1.__decorate([
|
|
979
|
-
core_1.ContentChild(kendo_angular_toolbar_1.ToolBarComponent, { static: false }),
|
|
980
|
-
tslib_1.__metadata("design:type", kendo_angular_toolbar_1.ToolBarComponent)
|
|
981
|
-
], EditorComponent.prototype, "userToolBarComponent", void 0);
|
|
982
|
-
tslib_1.__decorate([
|
|
983
|
-
core_1.ContentChild(kendo_angular_toolbar_1.ToolBarComponent, { read: core_1.ElementRef, static: false }),
|
|
984
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
985
|
-
], EditorComponent.prototype, "userToolBarElement", void 0);
|
|
986
|
-
tslib_1.__decorate([
|
|
987
|
-
core_1.ViewChild('dialogsContainer', { read: core_1.ViewContainerRef, static: true }),
|
|
988
|
-
tslib_1.__metadata("design:type", core_1.ViewContainerRef)
|
|
989
|
-
], EditorComponent.prototype, "dialogContainer", void 0);
|
|
990
|
-
tslib_1.__decorate([
|
|
991
|
-
core_1.ViewChild('content', { read: core_1.ViewContainerRef, static: false }),
|
|
992
|
-
tslib_1.__metadata("design:type", core_1.ViewContainerRef)
|
|
993
|
-
], EditorComponent.prototype, "container", void 0);
|
|
994
|
-
tslib_1.__decorate([
|
|
995
|
-
core_1.ViewChild('defaultToolbar', { read: core_1.ElementRef, static: false }),
|
|
996
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
997
|
-
], EditorComponent.prototype, "defaultToolbar", void 0);
|
|
998
|
-
tslib_1.__decorate([
|
|
999
|
-
core_1.ViewChild('defaultToolbar', { read: kendo_angular_toolbar_1.ToolBarComponent, static: false }),
|
|
1000
|
-
tslib_1.__metadata("design:type", kendo_angular_toolbar_1.ToolBarComponent)
|
|
1001
|
-
], EditorComponent.prototype, "defaultToolbarComponent", void 0);
|
|
1002
|
-
EditorComponent = EditorComponent_1 = tslib_1.__decorate([
|
|
1003
|
-
core_1.Component({
|
|
1004
|
-
selector: 'kendo-editor',
|
|
1005
|
-
providers: [
|
|
1006
|
-
editor_localization_service_1.EditorLocalizationService,
|
|
1007
|
-
tools_service_1.EditorToolsService,
|
|
1008
|
-
{
|
|
1009
|
-
provide: kendo_angular_l10n_1.LocalizationService,
|
|
1010
|
-
useExisting: editor_localization_service_1.EditorLocalizationService
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
provide: kendo_angular_l10n_1.L10N_PREFIX,
|
|
1014
|
-
useValue: 'kendo.editor'
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
provide: forms_1.NG_VALUE_ACCESSOR,
|
|
1018
|
-
useExisting: core_1.forwardRef(function () { return EditorComponent_1; }),
|
|
1019
|
-
multi: true
|
|
1020
|
-
},
|
|
1021
|
-
{
|
|
1022
|
-
provide: kendo_angular_common_1.KendoInput,
|
|
1023
|
-
useExisting: core_1.forwardRef(function () { return EditorComponent_1; })
|
|
1024
|
-
}
|
|
1025
|
-
],
|
|
1026
|
-
/* tslint:disable:max-line-length */
|
|
1027
|
-
template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-blockquote=\"kendo.editor.blockquote|The title of the tool that wraps an element in a blockquote\"\n blockquote=\"Quotation\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-print=\"kendo.editor.print|The title of the print tool.\"\n print=\"Print\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-selectAll=\"kendo.editor.selectAll|The title of the tool that selects all content.\"\n selectAll=\"Select All\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content srcdoc=\"<!DOCTYPE html>\" frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
|
|
1028
|
-
styles: [
|
|
1029
|
-
"\n >>> .k-editor-content > .ProseMirror {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n outline: none;\n overflow: auto;\n }\n\n .k-iframe {\n width: 100%;\n height: 100%;\n display: block;\n }\n "
|
|
1030
|
-
]
|
|
1031
|
-
}),
|
|
1032
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_dialog_1.DialogService,
|
|
1033
|
-
kendo_angular_l10n_1.LocalizationService,
|
|
1034
|
-
core_1.ChangeDetectorRef,
|
|
1035
|
-
core_1.NgZone,
|
|
1036
|
-
core_1.ElementRef,
|
|
1037
|
-
tools_service_1.EditorToolsService])
|
|
1038
|
-
], EditorComponent);
|
|
1039
|
-
return EditorComponent;
|
|
1040
|
-
}());
|
|
1041
|
-
exports.EditorComponent = EditorComponent;
|