jodit 4.0.18 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/CHANGELOG.md +72 -9
- package/es2015/jodit.css +3504 -3426
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +12104 -6610
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/debug/debug.js +14 -14
- package/es2015/plugins/debug/debug.min.js +3 -3
- package/es2015/plugins/speech-recognize/speech-recognize.css +2 -2
- package/es2015/plugins/speech-recognize/speech-recognize.js +117 -122
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +3 -3
- package/es2018/jodit.css +3504 -3426
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +3 -3
- package/es2018/jodit.js +12075 -6581
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.js +14 -14
- package/es2018/plugins/debug/debug.min.js +3 -3
- package/es2018/plugins/speech-recognize/speech-recognize.css +2 -2
- package/es2018/plugins/speech-recognize/speech-recognize.js +117 -122
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +3 -3
- package/es2021/jodit.css +3504 -3426
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +3 -3
- package/es2021/jodit.js +12075 -6581
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/debug/debug.js +14 -14
- package/es2021/plugins/debug/debug.min.js +3 -3
- package/es2021/plugins/speech-recognize/speech-recognize.css +2 -2
- package/es2021/plugins/speech-recognize/speech-recognize.js +117 -122
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +3 -3
- package/es2021.en/jodit.css +3504 -3426
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +11822 -6381
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/debug/debug.js +14 -14
- package/es2021.en/plugins/debug/debug.min.js +3 -3
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +2 -2
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +76 -81
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +3 -3
- package/es5/jodit.css +4207 -4114
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +3 -3
- package/es5/jodit.js +7617 -7279
- package/es5/jodit.min.css +5 -5
- package/es5/jodit.min.js +3 -3
- package/es5/plugins/debug/debug.js +16 -16
- package/es5/plugins/debug/debug.min.js +3 -3
- package/es5/plugins/speech-recognize/speech-recognize.css +2 -2
- package/es5/plugins/speech-recognize/speech-recognize.js +122 -127
- package/es5/plugins/speech-recognize/speech-recognize.min.js +3 -3
- package/esm/config.d.ts +6 -19
- package/esm/config.js +18 -5
- package/esm/core/async/async.js +4 -4
- package/esm/core/component/component.d.ts +2 -2
- package/esm/core/component/component.js +4 -4
- package/esm/core/component/index.d.ts +1 -1
- package/esm/core/component/index.js +1 -1
- package/esm/core/constants.d.ts +1 -0
- package/esm/core/constants.js +2 -1
- package/esm/core/create/create.d.ts +3 -2
- package/esm/core/create/create.js +5 -4
- package/esm/core/decorators/autobind/autobind.d.ts +6 -0
- package/esm/core/decorators/autobind/autobind.js +6 -0
- package/esm/core/decorators/cache/cache.d.ts +2 -2
- package/esm/core/decorators/cache/cache.js +4 -4
- package/esm/core/decorators/debounce/debounce.d.ts +1 -1
- package/esm/core/decorators/debounce/debounce.js +2 -2
- package/esm/core/decorators/index.d.ts +3 -3
- package/esm/core/decorators/index.js +3 -3
- package/esm/core/decorators/wait/wait.js +1 -1
- package/esm/core/decorators/watch/watch.js +3 -3
- package/esm/core/dom/dom.js +2 -2
- package/esm/core/dom/lazy-walker.js +1 -1
- package/esm/core/event-emitter/event-emitter.js +4 -4
- package/esm/core/event-emitter/observable.d.ts +1 -1
- package/esm/core/event-emitter/observable.js +1 -1
- package/esm/core/event-emitter/store.js +1 -1
- package/esm/core/global.d.ts +1 -1
- package/esm/core/global.js +7 -7
- package/esm/core/helpers/array/as-array.d.ts +1 -1
- package/esm/core/helpers/array/to-array.js +1 -1
- package/esm/core/helpers/checker/index.d.ts +3 -3
- package/esm/core/helpers/checker/index.js +3 -3
- package/esm/core/helpers/checker/is-imp-interface.js +1 -1
- package/esm/core/helpers/checker/is-marker.js +1 -1
- package/esm/core/helpers/checker/is-url.d.ts +1 -1
- package/esm/core/helpers/checker/is-url.js +1 -1
- package/esm/core/helpers/checker/is-view-object.d.ts +1 -1
- package/esm/core/helpers/checker/is-view-object.js +1 -1
- package/esm/core/helpers/html/apply-styles.js +2 -2
- package/esm/core/helpers/html/clean-from-word.js +1 -1
- package/esm/core/helpers/html/index.d.ts +2 -2
- package/esm/core/helpers/html/index.js +2 -2
- package/esm/core/helpers/html/safe-html.js +1 -1
- package/esm/core/helpers/html/strip-tags.d.ts +1 -1
- package/esm/core/helpers/html/strip-tags.js +2 -2
- package/esm/core/helpers/index.d.ts +1 -1
- package/esm/core/helpers/index.js +1 -1
- package/esm/core/helpers/normalize/index.d.ts +2 -2
- package/esm/core/helpers/normalize/index.js +2 -2
- package/esm/core/helpers/normalize/normalize-css-value.js +2 -2
- package/esm/core/helpers/normalize/normalize-key-aliases.js +1 -1
- package/esm/core/helpers/size/get-scroll-parent.js +1 -1
- package/esm/core/helpers/size/index.d.ts +1 -1
- package/esm/core/helpers/size/index.js +1 -1
- package/esm/core/helpers/string/i18n.js +3 -3
- package/esm/core/helpers/string/trim.js +1 -1
- package/esm/core/helpers/utils/append-script.js +1 -1
- package/esm/core/helpers/utils/attr.js +1 -1
- package/esm/core/helpers/utils/config-proto.js +3 -3
- package/esm/core/helpers/utils/css.js +2 -2
- package/esm/core/helpers/utils/data-bind.d.ts +1 -1
- package/esm/core/helpers/utils/index.d.ts +1 -1
- package/esm/core/helpers/utils/index.js +1 -1
- package/esm/core/helpers/utils/print.js +2 -2
- package/esm/core/helpers/utils/reset.js +2 -2
- package/esm/core/helpers/utils/selector.d.ts +7 -6
- package/esm/core/helpers/utils/selector.js +6 -8
- package/esm/core/helpers/utils/set.js +2 -2
- package/esm/core/helpers/utils/utils.d.ts +4 -4
- package/esm/core/helpers/utils/utils.js +2 -2
- package/esm/core/plugin/helpers/init-instance.d.ts +1 -1
- package/esm/core/plugin/helpers/init-instance.js +3 -3
- package/esm/core/plugin/helpers/load.js +2 -2
- package/esm/core/plugin/helpers/make-instance.js +1 -1
- package/esm/core/plugin/index.d.ts +1 -1
- package/esm/core/plugin/index.js +1 -1
- package/esm/core/plugin/plugin-system.js +5 -5
- package/esm/core/plugin/plugin.js +1 -1
- package/esm/core/request/ajax.d.ts +1 -1
- package/esm/core/request/ajax.js +5 -5
- package/esm/core/selection/helpers/move-node-inside-start.js +1 -1
- package/esm/core/selection/index.d.ts +1 -1
- package/esm/core/selection/index.js +1 -1
- package/esm/core/selection/selection.js +5 -5
- package/esm/core/selection/style/api/extract.js +2 -2
- package/esm/core/selection/style/api/finite-state-machine.js +3 -2
- package/esm/core/selection/style/api/get-suit-child.d.ts +1 -1
- package/esm/core/selection/style/api/get-suit-parent.d.ts +1 -1
- package/esm/core/selection/style/api/has-same-style.js +2 -2
- package/esm/core/selection/style/api/index.d.ts +5 -5
- package/esm/core/selection/style/api/index.js +5 -5
- package/esm/core/selection/style/api/is-same-attributes.js +1 -1
- package/esm/core/selection/style/api/is-suit-element.d.ts +1 -1
- package/esm/core/selection/style/api/is-suit-element.js +1 -1
- package/esm/core/selection/style/api/list/toggle-ordered-list.d.ts +1 -1
- package/esm/core/selection/style/api/list/toggle-ordered-list.js +1 -1
- package/esm/core/selection/style/api/list/wrap-list.d.ts +1 -1
- package/esm/core/selection/style/api/list/wrap-list.js +1 -1
- package/esm/core/selection/style/api/toggle-attributes.d.ts +1 -1
- package/esm/core/selection/style/api/toggle-attributes.js +6 -6
- package/esm/core/selection/style/api/wrap-unwrapped-text.d.ts +1 -1
- package/esm/core/selection/style/api/wrap.d.ts +1 -1
- package/esm/core/selection/style/api/wrap.js +1 -1
- package/esm/core/selection/style/apply-style.d.ts +1 -1
- package/esm/core/selection/style/apply-style.js +1 -1
- package/esm/core/selection/style/commit-style.d.ts +2 -2
- package/esm/core/selection/style/commit-style.js +1 -1
- package/esm/core/selection/style/transactions.d.ts +1 -1
- package/esm/core/selection/style/transactions.js +3 -4
- package/esm/core/storage/index.d.ts +1 -1
- package/esm/core/storage/index.js +1 -1
- package/esm/core/traits/dlgs.d.ts +1 -1
- package/esm/core/traits/dlgs.js +1 -1
- package/esm/core/traits/mods.d.ts +1 -1
- package/esm/core/ui/button/button/button.d.ts +4 -4
- package/esm/core/ui/button/button/button.js +8 -11
- package/esm/core/ui/button/group/group.d.ts +1 -1
- package/esm/core/ui/button/group/group.js +2 -5
- package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -1
- package/esm/core/ui/button/tooltip/tooltip.js +4 -9
- package/esm/core/ui/element.d.ts +1 -1
- package/esm/core/ui/element.js +4 -4
- package/esm/core/ui/form/block/block.d.ts +1 -1
- package/esm/core/ui/form/block/block.js +2 -5
- package/esm/core/ui/form/form.d.ts +1 -1
- package/esm/core/ui/form/form.js +5 -4
- package/esm/core/ui/form/index.d.ts +1 -1
- package/esm/core/ui/form/index.js +1 -1
- package/esm/core/ui/form/inputs/area/area.d.ts +2 -2
- package/esm/core/ui/form/inputs/area/area.js +2 -5
- package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +2 -2
- package/esm/core/ui/form/inputs/checkbox/checkbox.js +2 -5
- package/esm/core/ui/form/inputs/file/file.d.ts +1 -1
- package/esm/core/ui/form/inputs/file/file.js +1 -4
- package/esm/core/ui/form/inputs/index.d.ts +2 -2
- package/esm/core/ui/form/inputs/index.js +2 -2
- package/esm/core/ui/form/inputs/input/input.d.ts +1 -1
- package/esm/core/ui/form/inputs/input/input.js +5 -8
- package/esm/core/ui/form/inputs/select/select.d.ts +1 -1
- package/esm/core/ui/form/inputs/select/select.js +1 -4
- package/esm/core/ui/group/group.d.ts +2 -3
- package/esm/core/ui/group/group.js +3 -8
- package/esm/core/ui/group/list.d.ts +2 -2
- package/esm/core/ui/group/list.js +4 -7
- package/esm/core/ui/group/separator.d.ts +0 -3
- package/esm/core/ui/group/separator.js +1 -1
- package/esm/core/ui/group/spacer.d.ts +0 -3
- package/esm/core/ui/group/spacer.js +1 -1
- package/esm/core/ui/helpers/get-strong-control-types.js +2 -2
- package/esm/core/ui/icon.js +3 -3
- package/esm/core/ui/index.d.ts +3 -3
- package/esm/core/ui/index.js +3 -3
- package/esm/core/ui/popup/popup.d.ts +1 -1
- package/esm/core/ui/popup/popup.js +4 -9
- package/esm/core/ui/progress-bar/progress-bar.d.ts +1 -1
- package/esm/core/ui/progress-bar/progress-bar.js +0 -5
- package/esm/core/view/view-with-toolbar.d.ts +5 -5
- package/esm/core/view/view-with-toolbar.js +11 -13
- package/esm/core/view/view.d.ts +6 -6
- package/esm/core/view/view.js +15 -8
- package/esm/index.d.ts +2 -7
- package/esm/index.js +11 -4
- package/esm/jodit.d.ts +7 -7
- package/esm/jodit.js +16 -17
- package/esm/languages.js +2 -2
- package/esm/modules/context-menu/context-menu.d.ts +3 -3
- package/esm/modules/context-menu/context-menu.js +4 -9
- package/esm/modules/dialog/alert.js +2 -2
- package/esm/modules/dialog/confirm.js +1 -1
- package/esm/modules/dialog/dialog.d.ts +2 -2
- package/esm/modules/dialog/dialog.js +9 -12
- package/esm/modules/dialog/index.d.ts +2 -2
- package/esm/modules/dialog/index.js +2 -2
- package/esm/modules/dialog/prompt.js +1 -1
- package/esm/modules/file-browser/builders/context-menu.d.ts +1 -1
- package/esm/modules/file-browser/builders/context-menu.js +3 -3
- package/esm/modules/file-browser/config.d.ts +3 -0
- package/esm/modules/file-browser/config.js +2 -5
- package/esm/modules/file-browser/data-provider.d.ts +1 -1
- package/esm/modules/file-browser/data-provider.js +2 -2
- package/esm/modules/file-browser/file-browser.d.ts +3 -3
- package/esm/modules/file-browser/file-browser.js +13 -16
- package/esm/modules/file-browser/listeners/native-listeners.d.ts +1 -1
- package/esm/modules/file-browser/listeners/native-listeners.js +1 -1
- package/esm/modules/file-browser/listeners/self-listeners.js +4 -4
- package/esm/modules/file-browser/ui/files/files.d.ts +1 -1
- package/esm/modules/file-browser/ui/tree/tree.d.ts +1 -1
- package/esm/modules/history/history.d.ts +1 -1
- package/esm/modules/history/history.js +3 -3
- package/esm/modules/history/snapshot.js +1 -1
- package/esm/modules/image-editor/config.js +1 -1
- package/esm/modules/image-editor/image-editor.d.ts +2 -2
- package/esm/modules/image-editor/image-editor.js +4 -9
- package/esm/modules/index.d.ts +13 -12
- package/esm/modules/index.js +13 -12
- package/esm/modules/messages/message.js +1 -1
- package/esm/modules/messages/messages.d.ts +1 -1
- package/esm/modules/messages/messages.js +1 -6
- package/esm/modules/status-bar/status-bar.d.ts +3 -3
- package/esm/modules/status-bar/status-bar.js +3 -8
- package/esm/modules/table/table.js +3 -3
- package/esm/modules/toolbar/button/button.d.ts +2 -2
- package/esm/modules/toolbar/button/button.js +9 -14
- package/esm/modules/toolbar/button/content.d.ts +1 -1
- package/esm/modules/toolbar/button/content.js +3 -6
- package/esm/modules/toolbar/button/select/select.d.ts +1 -1
- package/esm/modules/toolbar/button/select/select.js +0 -3
- package/esm/modules/toolbar/collection/collection.d.ts +4 -4
- package/esm/modules/toolbar/collection/collection.js +3 -8
- package/esm/modules/toolbar/collection/editor-collection.d.ts +1 -1
- package/esm/modules/toolbar/collection/editor-collection.js +2 -5
- package/esm/modules/toolbar/factory.js +2 -2
- package/esm/modules/uploader/config.js +1 -1
- package/esm/modules/uploader/helpers/index.d.ts +2 -2
- package/esm/modules/uploader/helpers/index.js +2 -2
- package/esm/modules/uploader/helpers/process-old-browser-drag.js +1 -1
- package/esm/modules/uploader/helpers/send.js +1 -2
- package/esm/modules/uploader/uploader.d.ts +1 -1
- package/esm/modules/uploader/uploader.js +3 -8
- package/esm/modules/widget/color-picker/color-picker.d.ts +3 -3
- package/esm/modules/widget/color-picker/color-picker.js +4 -9
- package/esm/modules/widget/file-selector/file-selector.js +2 -2
- package/esm/modules/widget/index.d.ts +1 -1
- package/esm/modules/widget/index.js +1 -1
- package/esm/modules/widget/tabs/tabs.d.ts +1 -1
- package/esm/modules/widget/tabs/tabs.js +2 -7
- package/esm/plugins/about/about.d.ts +0 -5
- package/esm/plugins/about/about.js +3 -8
- package/esm/plugins/add-new-line/add-new-line.d.ts +1 -1
- package/esm/plugins/add-new-line/add-new-line.js +2 -7
- package/esm/plugins/add-new-line/config.js +1 -1
- package/esm/plugins/ai-assistant/ai-assistant.d.ts +27 -0
- package/esm/plugins/ai-assistant/ai-assistant.js +104 -0
- package/esm/plugins/ai-assistant/ai-assistant.svg.js +1 -0
- package/esm/plugins/ai-assistant/chat-bot.svg.js +1 -0
- package/esm/plugins/ai-assistant/config.d.ts +72 -0
- package/esm/plugins/ai-assistant/config.js +91 -0
- package/esm/plugins/ai-assistant/langs/en.d.ts +9 -0
- package/esm/plugins/ai-assistant/langs/en.js +14 -0
- package/esm/plugins/ai-assistant/langs/es.d.ts +40 -0
- package/esm/plugins/ai-assistant/langs/es.js +45 -0
- package/esm/plugins/ai-assistant/langs/index.d.ts +8 -0
- package/esm/plugins/ai-assistant/langs/index.js +8 -0
- package/esm/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +34 -0
- package/esm/plugins/ai-assistant/ui/ui-ai-assistant.js +141 -0
- package/esm/plugins/backspace/backspace.js +5 -5
- package/esm/plugins/backspace/cases/check-join-neighbors.js +2 -2
- package/esm/plugins/backspace/cases/check-remove-char.js +2 -2
- package/esm/plugins/backspace/cases/check-remove-empty-parent.js +1 -1
- package/esm/plugins/backspace/cases/check-remove-unbreakable-element.js +1 -1
- package/esm/plugins/backspace/cases/check-unwrap-first-list-item.d.ts +1 -1
- package/esm/plugins/backspace/cases/check-unwrap-first-list-item.js +1 -1
- package/esm/plugins/backspace/cases/index.d.ts +1 -1
- package/esm/plugins/backspace/cases/index.js +6 -6
- package/esm/plugins/bold/bold.js +4 -4
- package/esm/plugins/class-span/class-span.js +3 -3
- package/esm/plugins/clean-html/clean-html.js +5 -5
- package/esm/plugins/clean-html/config.js +1 -1
- package/esm/plugins/clean-html/helpers/get-hash.js +1 -1
- package/esm/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.js +1 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +1 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/index.d.ts +2 -2
- package/esm/plugins/clean-html/helpers/visitor/filters/index.js +2 -2
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +1 -1
- package/esm/plugins/clean-html/helpers/visitor/visit-node-walker.d.ts +1 -1
- package/esm/plugins/clean-html/helpers/visitor/visit-node-walker.js +1 -1
- package/esm/plugins/clipboard/clipboard.js +1 -1
- package/esm/plugins/clipboard/config.js +1 -1
- package/esm/plugins/color/color.js +1 -1
- package/esm/plugins/color/config.js +3 -3
- package/esm/plugins/copy-format/copy-format.js +2 -2
- package/esm/plugins/delete/delete.js +2 -2
- package/esm/plugins/drag-and-drop/drag-and-drop.js +2 -2
- package/esm/plugins/drag-and-drop-element/drag-and-drop-element.js +3 -3
- package/esm/plugins/dtd/dtd.js +3 -3
- package/esm/plugins/enter/enter.js +5 -5
- package/esm/plugins/enter/helpers/check-br.js +2 -2
- package/esm/plugins/enter/helpers/index.d.ts +2 -2
- package/esm/plugins/enter/helpers/index.js +2 -2
- package/esm/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +1 -1
- package/esm/plugins/enter/helpers/split-fragment.js +1 -1
- package/esm/plugins/file/file.js +2 -2
- package/esm/plugins/focus/focus.js +1 -1
- package/esm/plugins/font/config.js +4 -4
- package/esm/plugins/font/font.js +1 -1
- package/esm/plugins/format-block/config.js +2 -2
- package/esm/plugins/fullsize/config.d.ts +0 -3
- package/esm/plugins/fullsize/config.js +1 -4
- package/esm/plugins/fullsize/fullsize.d.ts +1 -1
- package/esm/plugins/fullsize/fullsize.js +2 -7
- package/esm/plugins/hotkeys/hotkeys.js +2 -2
- package/esm/plugins/hr/hr.js +1 -1
- package/esm/plugins/iframe/iframe.js +2 -2
- package/esm/plugins/image/image.js +3 -3
- package/esm/plugins/image-processor/image-processor.js +3 -3
- package/esm/plugins/image-properties/image-properties.d.ts +1 -1
- package/esm/plugins/image-properties/image-properties.js +6 -11
- package/esm/plugins/indent/config.js +2 -2
- package/esm/plugins/indent/indent.js +1 -1
- package/esm/plugins/index.d.ts +1 -0
- package/esm/plugins/inline-popup/config/config.js +9 -11
- package/esm/plugins/inline-popup/config/items/img.js +1 -1
- package/esm/plugins/inline-popup/inline-popup.d.ts +1 -1
- package/esm/plugins/inline-popup/inline-popup.js +6 -11
- package/esm/plugins/justify/justify.js +3 -3
- package/esm/plugins/key-arrow-outside/key-arrow-outside.js +2 -2
- package/esm/plugins/limit/limit.js +1 -1
- package/esm/plugins/line-height/config.js +1 -1
- package/esm/plugins/line-height/line-height.js +3 -3
- package/esm/plugins/link/config.d.ts +1 -1
- package/esm/plugins/link/config.js +2 -2
- package/esm/plugins/link/link.js +2 -2
- package/esm/plugins/link/template.js +1 -1
- package/esm/plugins/media/media.js +1 -1
- package/esm/plugins/mobile/config.d.ts +3 -0
- package/esm/plugins/mobile/config.js +2 -5
- package/esm/plugins/mobile/mobile.js +1 -1
- package/esm/plugins/ordered-list/config.js +1 -1
- package/esm/plugins/ordered-list/ordered-list.js +1 -1
- package/esm/plugins/paste/config.js +3 -1
- package/esm/plugins/paste/helpers.js +2 -2
- package/esm/plugins/paste/paste.js +4 -4
- package/esm/plugins/paste-from-word/config.js +1 -1
- package/esm/plugins/paste-from-word/paste-from-word.d.ts +1 -1
- package/esm/plugins/paste-from-word/paste-from-word.js +3 -3
- package/esm/plugins/paste-storage/paste-storage.d.ts +1 -6
- package/esm/plugins/paste-storage/paste-storage.js +2 -7
- package/esm/plugins/placeholder/placeholder.d.ts +1 -1
- package/esm/plugins/placeholder/placeholder.js +5 -10
- package/esm/plugins/preview/preview.d.ts +1 -1
- package/esm/plugins/preview/preview.js +1 -6
- package/esm/plugins/print/print.js +4 -5
- package/esm/plugins/redo-undo/redo-undo.js +2 -2
- package/esm/plugins/resize-cells/resize-cells.d.ts +1 -1
- package/esm/plugins/resize-cells/resize-cells.js +2 -7
- package/esm/plugins/resize-handler/resize-handler.js +3 -3
- package/esm/plugins/resizer/resizer.d.ts +1 -1
- package/esm/plugins/resizer/resizer.js +3 -9
- package/esm/plugins/search/config.js +2 -2
- package/esm/plugins/search/helpers/index.d.ts +1 -1
- package/esm/plugins/search/helpers/index.js +1 -1
- package/esm/plugins/search/search.d.ts +1 -1
- package/esm/plugins/search/search.js +6 -6
- package/esm/plugins/search/ui/search.d.ts +1 -1
- package/esm/plugins/search/ui/search.js +2 -5
- package/esm/plugins/select/select.js +3 -3
- package/esm/plugins/select-cells/select-cells.js +4 -4
- package/esm/plugins/size/config.js +1 -1
- package/esm/plugins/size/size.d.ts +1 -1
- package/esm/plugins/size/size.js +2 -7
- package/esm/plugins/source/config.js +1 -1
- package/esm/plugins/source/editor/engines/area.js +1 -1
- package/esm/plugins/source/editor/engines/index.d.ts +1 -1
- package/esm/plugins/source/editor/engines/index.js +1 -1
- package/esm/plugins/source/source.d.ts +1 -1
- package/esm/plugins/source/source.js +4 -9
- package/esm/plugins/speech-recognize/config.js +3 -3
- package/esm/plugins/speech-recognize/helpers/recognize-manager.d.ts +1 -1
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +2 -2
- package/esm/plugins/speech-recognize/speech-recognize.d.ts +1 -1
- package/esm/plugins/speech-recognize/speech-recognize.js +5 -10
- package/esm/plugins/spellcheck/config.js +1 -1
- package/esm/plugins/spellcheck/spellcheck.js +3 -3
- package/esm/plugins/stat/stat.js +1 -1
- package/esm/plugins/sticky/sticky.d.ts +1 -1
- package/esm/plugins/sticky/sticky.js +3 -8
- package/esm/plugins/symbols/config.js +1 -1
- package/esm/plugins/symbols/symbols.d.ts +1 -1
- package/esm/plugins/symbols/symbols.js +3 -8
- package/esm/plugins/tab/tab.js +3 -3
- package/esm/plugins/table/config.js +2 -2
- package/esm/plugins/table/table.d.ts +1 -1
- package/esm/plugins/table/table.js +0 -5
- package/esm/plugins/table-keyboard-navigation/table-keyboard-navigation.js +1 -1
- package/esm/plugins/video/config.js +3 -3
- package/esm/plugins/wrap-nodes/config.d.ts +1 -1
- package/esm/plugins/wrap-nodes/wrap-nodes.js +3 -3
- package/esm/plugins/xpath/xpath.d.ts +1 -6
- package/esm/plugins/xpath/xpath.js +4 -9
- package/esm/polyfills.d.ts +10 -0
- package/esm/types/view.d.ts +1 -1
- package/package.json +2 -2
- package/types/config.d.ts +6 -19
- package/types/core/component/component.d.ts +2 -2
- package/types/core/component/index.d.ts +1 -1
- package/types/core/constants.d.ts +1 -0
- package/types/core/create/create.d.ts +3 -2
- package/types/core/decorators/autobind/autobind.d.ts +6 -0
- package/types/core/decorators/cache/cache.d.ts +2 -2
- package/types/core/decorators/debounce/debounce.d.ts +1 -1
- package/types/core/decorators/index.d.ts +3 -3
- package/types/core/event-emitter/observable.d.ts +1 -1
- package/types/core/global.d.ts +1 -1
- package/types/core/helpers/array/as-array.d.ts +1 -1
- package/types/core/helpers/checker/index.d.ts +3 -3
- package/types/core/helpers/checker/is-url.d.ts +1 -1
- package/types/core/helpers/checker/is-view-object.d.ts +1 -1
- package/types/core/helpers/html/index.d.ts +2 -2
- package/types/core/helpers/html/strip-tags.d.ts +1 -1
- package/types/core/helpers/index.d.ts +1 -1
- package/types/core/helpers/normalize/index.d.ts +2 -2
- package/types/core/helpers/size/index.d.ts +1 -1
- package/types/core/helpers/utils/data-bind.d.ts +1 -1
- package/types/core/helpers/utils/index.d.ts +1 -1
- package/types/core/helpers/utils/selector.d.ts +7 -6
- package/types/core/helpers/utils/utils.d.ts +4 -4
- package/types/core/plugin/helpers/init-instance.d.ts +1 -1
- package/types/core/plugin/index.d.ts +1 -1
- package/types/core/request/ajax.d.ts +1 -1
- package/types/core/selection/index.d.ts +1 -1
- package/types/core/selection/style/api/get-suit-child.d.ts +1 -1
- package/types/core/selection/style/api/get-suit-parent.d.ts +1 -1
- package/types/core/selection/style/api/index.d.ts +5 -5
- package/types/core/selection/style/api/is-suit-element.d.ts +1 -1
- package/types/core/selection/style/api/list/toggle-ordered-list.d.ts +1 -1
- package/types/core/selection/style/api/list/wrap-list.d.ts +1 -1
- package/types/core/selection/style/api/toggle-attributes.d.ts +1 -1
- package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +1 -1
- package/types/core/selection/style/api/wrap.d.ts +1 -1
- package/types/core/selection/style/apply-style.d.ts +1 -1
- package/types/core/selection/style/commit-style.d.ts +2 -2
- package/types/core/selection/style/transactions.d.ts +1 -1
- package/types/core/storage/index.d.ts +1 -1
- package/types/core/traits/dlgs.d.ts +1 -1
- package/types/core/traits/mods.d.ts +1 -1
- package/types/core/ui/button/button/button.d.ts +4 -4
- package/types/core/ui/button/group/group.d.ts +1 -1
- package/types/core/ui/button/tooltip/tooltip.d.ts +1 -1
- package/types/core/ui/element.d.ts +1 -1
- package/types/core/ui/form/block/block.d.ts +1 -1
- package/types/core/ui/form/form.d.ts +1 -1
- package/types/core/ui/form/index.d.ts +1 -1
- package/types/core/ui/form/inputs/area/area.d.ts +2 -2
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +2 -2
- package/types/core/ui/form/inputs/file/file.d.ts +1 -1
- package/types/core/ui/form/inputs/index.d.ts +2 -2
- package/types/core/ui/form/inputs/input/input.d.ts +1 -1
- package/types/core/ui/form/inputs/select/select.d.ts +1 -1
- package/types/core/ui/group/group.d.ts +2 -3
- package/types/core/ui/group/list.d.ts +2 -2
- package/types/core/ui/group/separator.d.ts +0 -3
- package/types/core/ui/group/spacer.d.ts +0 -3
- package/types/core/ui/index.d.ts +3 -3
- package/types/core/ui/popup/popup.d.ts +1 -1
- package/types/core/ui/progress-bar/progress-bar.d.ts +1 -1
- package/types/core/view/view-with-toolbar.d.ts +5 -5
- package/types/core/view/view.d.ts +6 -6
- package/types/index.d.ts +2 -7
- package/types/jodit.d.ts +7 -7
- package/types/modules/context-menu/context-menu.d.ts +3 -3
- package/types/modules/dialog/dialog.d.ts +2 -2
- package/types/modules/dialog/index.d.ts +2 -2
- package/types/modules/file-browser/builders/context-menu.d.ts +1 -1
- package/types/modules/file-browser/config.d.ts +3 -0
- package/types/modules/file-browser/data-provider.d.ts +1 -1
- package/types/modules/file-browser/file-browser.d.ts +3 -3
- package/types/modules/file-browser/listeners/native-listeners.d.ts +1 -1
- package/types/modules/file-browser/ui/files/files.d.ts +1 -1
- package/types/modules/file-browser/ui/tree/tree.d.ts +1 -1
- package/types/modules/history/history.d.ts +1 -1
- package/types/modules/image-editor/image-editor.d.ts +2 -2
- package/types/modules/index.d.ts +13 -12
- package/types/modules/messages/messages.d.ts +1 -1
- package/types/modules/status-bar/status-bar.d.ts +3 -3
- package/types/modules/toolbar/button/button.d.ts +2 -2
- package/types/modules/toolbar/button/content.d.ts +1 -1
- package/types/modules/toolbar/button/select/select.d.ts +1 -1
- package/types/modules/toolbar/collection/collection.d.ts +4 -4
- package/types/modules/toolbar/collection/editor-collection.d.ts +1 -1
- package/types/modules/uploader/helpers/index.d.ts +2 -2
- package/types/modules/uploader/uploader.d.ts +1 -1
- package/types/modules/widget/color-picker/color-picker.d.ts +3 -3
- package/types/modules/widget/index.d.ts +1 -1
- package/types/modules/widget/tabs/tabs.d.ts +1 -1
- package/types/plugins/about/about.d.ts +0 -5
- package/types/plugins/add-new-line/add-new-line.d.ts +1 -1
- package/types/plugins/ai-assistant/ai-assistant.d.ts +27 -0
- package/types/plugins/ai-assistant/config.d.ts +72 -0
- package/types/plugins/ai-assistant/langs/en.d.ts +9 -0
- package/types/plugins/ai-assistant/langs/es.d.ts +40 -0
- package/types/plugins/ai-assistant/langs/index.d.ts +8 -0
- package/types/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +34 -0
- package/types/plugins/backspace/cases/check-unwrap-first-list-item.d.ts +1 -1
- package/types/plugins/backspace/cases/index.d.ts +1 -1
- package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +2 -2
- package/types/plugins/clean-html/helpers/visitor/visit-node-walker.d.ts +1 -1
- package/types/plugins/enter/helpers/index.d.ts +2 -2
- package/types/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +1 -1
- package/types/plugins/fullsize/config.d.ts +0 -3
- package/types/plugins/fullsize/fullsize.d.ts +1 -1
- package/types/plugins/image-properties/image-properties.d.ts +1 -1
- package/types/plugins/index.d.ts +1 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +1 -1
- package/types/plugins/link/config.d.ts +1 -1
- package/types/plugins/mobile/config.d.ts +3 -0
- package/types/plugins/paste-from-word/paste-from-word.d.ts +1 -1
- package/types/plugins/paste-storage/paste-storage.d.ts +1 -6
- package/types/plugins/placeholder/placeholder.d.ts +1 -1
- package/types/plugins/preview/preview.d.ts +1 -1
- package/types/plugins/resize-cells/resize-cells.d.ts +1 -1
- package/types/plugins/resizer/resizer.d.ts +1 -1
- package/types/plugins/search/helpers/index.d.ts +1 -1
- package/types/plugins/search/search.d.ts +1 -1
- package/types/plugins/search/ui/search.d.ts +1 -1
- package/types/plugins/size/size.d.ts +1 -1
- package/types/plugins/source/editor/engines/index.d.ts +1 -1
- package/types/plugins/source/source.d.ts +1 -1
- package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +1 -1
- package/types/plugins/speech-recognize/speech-recognize.d.ts +1 -1
- package/types/plugins/sticky/sticky.d.ts +1 -1
- package/types/plugins/symbols/symbols.d.ts +1 -1
- package/types/plugins/table/table.d.ts +1 -1
- package/types/plugins/wrap-nodes/config.d.ts +1 -1
- package/types/plugins/xpath/xpath.d.ts +1 -6
- package/types/polyfills.d.ts +10 -0
- package/types/types/view.d.ts +1 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import { Config } from "jodit/esm/config.js";
|
|
7
6
|
import { isArray } from "jodit/esm/core/helpers/checker/is-array.js";
|
|
8
7
|
import { isJoditObject } from "jodit/esm/core/helpers/checker/is-jodit-object.js";
|
|
8
|
+
import { Config } from "jodit/esm/config.js";
|
|
9
9
|
/**
|
|
10
10
|
* Module for processing download documents and images by Drag and Drop
|
|
11
11
|
* Drag and Drop files
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module modules/uploader
|
|
8
8
|
*/
|
|
9
9
|
import type { Nullable } from "jodit/esm/types";
|
|
10
|
-
export * from "./process-old-browser-drag";
|
|
11
|
-
export * from "./data-uri-to-blob";
|
|
12
10
|
export * from "./build-data";
|
|
11
|
+
export * from "./data-uri-to-blob";
|
|
12
|
+
export * from "./process-old-browser-drag";
|
|
13
13
|
export * from "./send";
|
|
14
14
|
export * from "./send-files";
|
|
15
15
|
export declare function hasFiles(data: Nullable<DataTransfer>): data is DataTransfer;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export * from "./process-old-browser-drag";
|
|
7
|
-
export * from "./data-uri-to-blob";
|
|
8
6
|
export * from "./build-data";
|
|
7
|
+
export * from "./data-uri-to-blob";
|
|
8
|
+
export * from "./process-old-browser-drag";
|
|
9
9
|
export * from "./send";
|
|
10
10
|
export * from "./send-files";
|
|
11
11
|
export function hasFiles(data) {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import { TEXT_PLAIN } from "jodit/esm/core/constants.js";
|
|
7
|
+
import { Dom } from "jodit/esm/core/dom/index.js";
|
|
7
8
|
import { getContainer } from "jodit/esm/core/global.js";
|
|
8
9
|
import { attr, isJoditObject } from "jodit/esm/core/helpers/index.js";
|
|
9
|
-
import { Dom } from "jodit/esm/core/dom/index.js";
|
|
10
10
|
import { dataURItoBlob, sendFiles } from "./index";
|
|
11
11
|
export function processOldBrowserDrag(self, cData, handlerSuccess, handlerError, onFinally) {
|
|
12
12
|
if (cData && (!cData.types.length || cData.types[0] !== TEXT_PLAIN)) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import { Ajax } from "jodit/esm/core/request/index.js";
|
|
7
6
|
import { isFunction, isPromise } from "jodit/esm/core/helpers/index.js";
|
|
7
|
+
import { Ajax } from "jodit/esm/core/request/index.js";
|
|
8
8
|
import { buildData } from "jodit/esm/modules/uploader/helpers/build-data.js";
|
|
9
9
|
export const ajaxInstances = new WeakMap();
|
|
10
10
|
export function send(uploader, data) {
|
|
@@ -20,7 +20,6 @@ export function send(uploader, data) {
|
|
|
20
20
|
if (evt.lengthComputable) {
|
|
21
21
|
let percentComplete = evt.loaded / evt.total;
|
|
22
22
|
percentComplete *= 100;
|
|
23
|
-
console.log('progress', percentComplete);
|
|
24
23
|
uploader.j.progressbar
|
|
25
24
|
.show()
|
|
26
25
|
.progress(percentComplete);
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module modules/uploader
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import type { HandlerError, HandlerSuccess, IUploader, IUploaderOptions, IViewBased } from "jodit/esm/types";
|
|
13
12
|
import { ViewComponent } from "jodit/esm/core/component/";
|
|
14
13
|
import "./config";
|
|
14
|
+
|
|
15
15
|
export declare class Uploader extends ViewComponent implements IUploader {
|
|
16
16
|
readonly jodit: IViewBased;
|
|
17
17
|
get j(): IViewBased;
|
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
* [[include:modules/uploader/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module modules/uploader
|
|
10
|
-
*/
|
|
11
|
-
import { Config } from "jodit/esm/config.js";
|
|
6
|
+
import { STATUSES, ViewComponent } from "jodit/esm/core/component/index.js";
|
|
12
7
|
import { IS_ES_NEXT, IS_IE } from "jodit/esm/core/constants.js";
|
|
13
|
-
import {
|
|
14
|
-
import { ViewComponent, STATUSES } from "jodit/esm/core/component/index.js";
|
|
8
|
+
import { ConfigProto, error, isFunction, isJoditObject } from "jodit/esm/core/helpers/index.js";
|
|
15
9
|
import { ajaxInstances, hasFiles, hasItems, processOldBrowserDrag, send, sendFiles } from "jodit/esm/modules/uploader/helpers/index.js";
|
|
16
10
|
import "./config";
|
|
11
|
+
import { Config } from "jodit/esm/config.js";
|
|
17
12
|
export class Uploader extends ViewComponent {
|
|
18
13
|
get j() {
|
|
19
14
|
return this.jodit;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module modules/widget/color-picker
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import type { IJodit } from "jodit/esm/types";
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* Build color picker
|
|
15
15
|
*
|
|
@@ -18,10 +18,10 @@ import type { IJodit } from "jodit/esm/types";
|
|
|
18
18
|
* @example
|
|
19
19
|
* ```javascript
|
|
20
20
|
* const tabs = TabsWidget(editor, {
|
|
21
|
-
* 'Text'
|
|
21
|
+
* 'Text': ColorPickerWidget(editor, function (color) {
|
|
22
22
|
* box.style.color = color;
|
|
23
23
|
* }, box.style.color),
|
|
24
|
-
* 'Background'
|
|
24
|
+
* 'Background': ColorPickerWidget(editor, function (color) {
|
|
25
25
|
* box.style.backgroundColor = color;
|
|
26
26
|
* }, box.style.backgroundColor),
|
|
27
27
|
* });
|
|
@@ -3,14 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:modules/widget/color-picker/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module modules/widget/color-picker
|
|
10
|
-
*/
|
|
11
|
-
import { normalizeColor, hasBrowserColorPicker, isPlainObject, attr, isFunction, isArray, refs } from "jodit/esm/core/helpers/index.js";
|
|
12
|
-
import { Icon } from "jodit/esm/core/ui/index.js";
|
|
13
6
|
import { Dom } from "jodit/esm/core/dom/index.js";
|
|
7
|
+
import { attr, hasBrowserColorPicker, isArray, isFunction, isPlainObject, normalizeColor, refs } from "jodit/esm/core/helpers/index.js";
|
|
8
|
+
import { Icon } from "jodit/esm/core/ui/index.js";
|
|
14
9
|
import paletteIcon from "./palette.svg.js";
|
|
15
10
|
Icon.set('palette', paletteIcon);
|
|
16
11
|
/**
|
|
@@ -21,10 +16,10 @@ Icon.set('palette', paletteIcon);
|
|
|
21
16
|
* @example
|
|
22
17
|
* ```javascript
|
|
23
18
|
* const tabs = TabsWidget(editor, {
|
|
24
|
-
* 'Text'
|
|
19
|
+
* 'Text': ColorPickerWidget(editor, function (color) {
|
|
25
20
|
* box.style.color = color;
|
|
26
21
|
* }, box.style.color),
|
|
27
|
-
* 'Background'
|
|
22
|
+
* 'Background': ColorPickerWidget(editor, function (color) {
|
|
28
23
|
* box.style.backgroundColor = color;
|
|
29
24
|
* }, box.style.backgroundColor),
|
|
30
25
|
* });
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import { isFunction, $$, attr } from "jodit/esm/core/helpers/index.js";
|
|
7
6
|
import { Dom } from "jodit/esm/core/dom/dom.js";
|
|
8
|
-
import {
|
|
7
|
+
import { $$, attr, isFunction } from "jodit/esm/core/helpers/index.js";
|
|
8
|
+
import { UIBlock, UIButton, UIForm, UIInput } from "jodit/esm/core/ui/index.js";
|
|
9
9
|
import { TabsWidget } from "jodit/esm/modules/widget/tabs/tabs.js";
|
|
10
10
|
/**
|
|
11
11
|
* Generate 3 tabs
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module modules/widget/tabs
|
|
10
|
-
*/
|
|
6
|
+
import { Component } from "jodit/esm/core/component/index.js";
|
|
7
|
+
import { Dom } from "jodit/esm/core/dom/dom.js";
|
|
11
8
|
import { $$ } from "jodit/esm/core/helpers/index.js";
|
|
12
9
|
import { isFunction } from "jodit/esm/core/helpers/checker/is-function.js";
|
|
13
10
|
import { Button, UIElement } from "jodit/esm/core/ui/index.js";
|
|
14
|
-
import { Component } from "jodit/esm/core/component/index.js";
|
|
15
|
-
import { Dom } from "jodit/esm/core/dom/dom.js";
|
|
16
11
|
/**
|
|
17
12
|
* Build tabs system
|
|
18
13
|
*
|
|
@@ -3,9 +3,4 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:plugins/about/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module plugins/about
|
|
10
|
-
*/
|
|
11
6
|
|
|
@@ -3,18 +3,13 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:plugins/about/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module plugins/about
|
|
10
|
-
*/
|
|
11
|
-
import { Config } from "jodit/esm/config.js";
|
|
12
|
-
import { css, isLicense, normalizeLicense } from "jodit/esm/core/helpers/index.js";
|
|
13
6
|
import * as constants from "jodit/esm/core/constants.js";
|
|
7
|
+
import { HOMEPAGE } from "jodit/esm/core/constants.js";
|
|
14
8
|
import { pluginSystem } from "jodit/esm/core/global.js";
|
|
9
|
+
import { css, isLicense, normalizeLicense } from "jodit/esm/core/helpers/index.js";
|
|
15
10
|
import { Icon } from "jodit/esm/core/ui/icon.js";
|
|
16
|
-
import { HOMEPAGE } from "jodit/esm/core/constants.js";
|
|
17
11
|
import aboutIcon from "./about.svg.js";
|
|
12
|
+
import { Config } from "jodit/esm/config.js";
|
|
18
13
|
Config.prototype.controls.about = {
|
|
19
14
|
exec: (editor) => {
|
|
20
15
|
const dialog = editor.dlg({ closeOnClickOverlay: true }), i = editor.i18n.bind(editor);
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module plugins/add-new-line
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
import type { IJodit } from "jodit/esm/types";
|
|
13
12
|
import { Plugin } from "jodit/esm/modules";
|
|
14
13
|
import "./config";
|
|
14
|
+
|
|
15
15
|
/**
|
|
16
16
|
* Create helper for adding new paragraph(Jodit.defaultOptions.enter tag) before iframe, table or image
|
|
17
17
|
*/
|
|
@@ -13,15 +13,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
14
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
17
|
-
* [[include:plugins/add-new-line/README.md]]
|
|
18
|
-
* @packageDocumentation
|
|
19
|
-
* @module plugins/add-new-line
|
|
20
|
-
*/
|
|
21
|
-
import { Dom, Icon, Plugin } from "jodit/esm/modules/index.js";
|
|
22
|
-
import { offset, position, call, scrollIntoViewIfNeeded } from "jodit/esm/core/helpers/index.js";
|
|
23
16
|
import { autobind, throttle, watch } from "jodit/esm/core/decorators/index.js";
|
|
24
17
|
import { pluginSystem } from "jodit/esm/core/global.js";
|
|
18
|
+
import { call, offset, position, scrollIntoViewIfNeeded } from "jodit/esm/core/helpers/index.js";
|
|
19
|
+
import { Dom, Icon, Plugin } from "jodit/esm/modules/index.js";
|
|
25
20
|
import "./config";
|
|
26
21
|
const ns = 'addnewline';
|
|
27
22
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import { Config } from "jodit/esm/config.js";
|
|
7
6
|
import { Icon } from "jodit/esm/core/ui/icon.js";
|
|
8
7
|
import enterIcon from "./enter.svg.js";
|
|
8
|
+
import { Config } from "jodit/esm/config.js";
|
|
9
9
|
Config.prototype.addNewLine = true;
|
|
10
10
|
Config.prototype.addNewLineOnDBLClick = true;
|
|
11
11
|
Config.prototype.addNewLineTagsTriggers = [
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* [[include:plugins/jodit-ai/README.md]]
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @module plugins/joditai
|
|
10
|
+
*/
|
|
11
|
+
import type { IJodit } from "jodit/esm/types";
|
|
12
|
+
import { Plugin } from "jodit/esm/core/plugin/plugin";
|
|
13
|
+
import "./config";
|
|
14
|
+
/**
|
|
15
|
+
* The plugin inserts content generated by AI into the editor.
|
|
16
|
+
*/
|
|
17
|
+
export declare class aiAssistant extends Plugin {
|
|
18
|
+
/** @override */
|
|
19
|
+
buttons: Plugin['buttons'];
|
|
20
|
+
constructor(jodit: IJodit);
|
|
21
|
+
/** @override */
|
|
22
|
+
afterInit(jodit: IJodit): void;
|
|
23
|
+
protected onGenerateAiAssistantForm(prompt: string): void;
|
|
24
|
+
protected onInvokeAiAssistant(prompt: string): void;
|
|
25
|
+
/** @override */
|
|
26
|
+
protected beforeDestruct(_: IJodit): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
9
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else
|
|
11
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
12
|
+
if (d = decorators[i])
|
|
13
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
import watch from "jodit/esm/core/decorators/watch/watch.js";
|
|
17
|
+
import { extendLang, pluginSystem } from "jodit/esm/core/global.js";
|
|
18
|
+
import { Plugin } from "jodit/esm/core/plugin/plugin.js";
|
|
19
|
+
import "./config";
|
|
20
|
+
import { UiAiAssistant } from "./ui/ui-ai-assistant";
|
|
21
|
+
import * as langs from "./langs";
|
|
22
|
+
/**
|
|
23
|
+
* The plugin inserts content generated by AI into the editor.
|
|
24
|
+
*/
|
|
25
|
+
export class aiAssistant extends Plugin {
|
|
26
|
+
constructor(jodit) {
|
|
27
|
+
super(jodit);
|
|
28
|
+
/** @override */
|
|
29
|
+
this.buttons = [
|
|
30
|
+
{
|
|
31
|
+
name: 'ai-commands',
|
|
32
|
+
group: 'insert'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'ai-assistant',
|
|
36
|
+
group: 'insert'
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
extendLang(langs);
|
|
40
|
+
}
|
|
41
|
+
/** @override */
|
|
42
|
+
afterInit(jodit) { }
|
|
43
|
+
onGenerateAiAssistantForm(prompt) {
|
|
44
|
+
const { jodit } = this;
|
|
45
|
+
const dialog = jodit.dlg({
|
|
46
|
+
buttons: ['fullsize', 'dialog.close'],
|
|
47
|
+
closeOnClickOverlay: true,
|
|
48
|
+
closeOnEsc: true,
|
|
49
|
+
resizable: false,
|
|
50
|
+
draggable: true,
|
|
51
|
+
minWidth: 460,
|
|
52
|
+
maxWidth: 460
|
|
53
|
+
});
|
|
54
|
+
dialog.bindDestruct(jodit);
|
|
55
|
+
const container = new UiAiAssistant(jodit, {
|
|
56
|
+
onInsertAfter(html) {
|
|
57
|
+
jodit.s.focus();
|
|
58
|
+
jodit.s.setCursorAfter(jodit.s.current());
|
|
59
|
+
jodit.s.insertHTML(html);
|
|
60
|
+
dialog.close();
|
|
61
|
+
},
|
|
62
|
+
onInsert(html) {
|
|
63
|
+
jodit.s.focus();
|
|
64
|
+
jodit.s.insertHTML(html);
|
|
65
|
+
dialog.close();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
container.bindDestruct(dialog);
|
|
69
|
+
dialog.open(container, 'AI Assistant', true, false);
|
|
70
|
+
container.setPrompt(prompt);
|
|
71
|
+
}
|
|
72
|
+
onInvokeAiAssistant(prompt) {
|
|
73
|
+
const { jodit } = this;
|
|
74
|
+
jodit.s.focus();
|
|
75
|
+
const selectedText = jodit.s.html;
|
|
76
|
+
jodit.async
|
|
77
|
+
.promise(async (resolve, reject) => {
|
|
78
|
+
try {
|
|
79
|
+
const result = await jodit.o.aiAssistant
|
|
80
|
+
.aiAssistantCallback(prompt, selectedText);
|
|
81
|
+
resolve(result);
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
reject(error);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.then((htmlFragment) => {
|
|
88
|
+
jodit.e.fire('ai-assistant-response', htmlFragment);
|
|
89
|
+
})
|
|
90
|
+
.catch(error => {
|
|
91
|
+
jodit.message.error(error.message);
|
|
92
|
+
jodit.e.fire('ai-assistant-error', error.message);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/** @override */
|
|
96
|
+
beforeDestruct(_) { }
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
watch(':generateAiAssistantForm.ai-assistant')
|
|
100
|
+
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
101
|
+
__decorate([
|
|
102
|
+
watch(':invokeAiAssistant')
|
|
103
|
+
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
104
|
+
pluginSystem.add('ai-assistant', aiAssistant);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 270 270\"> <path d=\"M 255.9537,58.150081 237.69527,40.997278 c -1.49414,-1.375593 -3.43653,-2.077427 -5.37891,-2.077427 -1.94239,0 -3.88478,0.701834 -5.37892,2.077427 L 29.919751,226.1128 c -2.988286,2.77926 -2.988286,7.32714 0,10.13447 L 48.148295,253.372 c 1.46426,1.37559 3.406646,2.1055 5.378915,2.1055 1.972268,0 3.884771,-0.72991 5.378914,-2.1055 L 221.34935,100.73732 255.9537,68.284552 c 2.9584,-2.807333 2.9584,-7.355212 0,-10.134471 z M 251.17244,63.79282 221.34935,91.781927 201.89561,73.506191 231.68882,45.48901 c 0.20918,-0.140367 0.38847,-0.224587 0.62754,-0.224587 0.23906,0 0.44824,0.08422 0.59765,0.224587 l 18.25843,17.152803 c 0,0 0.23906,0.33688 0.23906,0.561467 0,0.224586 -0.0896,0.4211 -0.23906,0.58954 z\" style=\"stroke-width:2.8964;stroke-opacity:1\" /> <path d=\"m 48.626421,116.87948 10.578532,23.10435 c 0.83672,1.82477 3.615826,1.85284 4.452546,0 l 10.937126,-23.52545 c 2.629692,-5.69888 7.470715,-10.24676 13.536935,-12.71722 l 25.07172,-10.274833 c 1.94239,-0.786053 1.94239,-3.396873 0,-4.182926 L 88.13156,79.008563 C 82.06534,76.53811 77.224317,71.990231 74.594625,66.291346 L 63.657499,42.737824 c -0.83672,-1.824766 -3.615826,-1.824766 -4.452546,0 L 48.267826,66.291346 C 45.638135,71.990231 40.797112,76.53811 34.730891,79.008563 L 9.6292894,89.311474 c -1.9423859,0.786054 -1.9423859,3.3688 0,4.182926 l 25.5498446,10.61172 c 6.036338,2.49852 10.847478,7.07448 13.477169,12.77336 z\" style=\"stroke-width:2.8964;fill-opacity:1;stroke-opacity:1\" /> <path d=\"m 111.79878,33.136746 13.56682,5.642739 c 3.19747,1.319446 5.76739,3.761826 7.14201,6.793745 l 5.61797,12.268044 c 0.44825,0.982567 1.91251,0.982567 2.36075,0 l 5.79727,-12.492631 c 1.4045,-3.031919 3.97442,-5.446225 7.20177,-6.765672 l 13.29788,-5.446225 c 1.0459,-0.4211 1.0459,-1.796693 0,-2.217793 l -13.29788,-5.446225 c -3.22735,-1.319447 -5.79727,-3.733753 -7.20177,-6.765672 L 140.48633,6.2144248 c -0.44824,-0.9825664 -1.9125,-0.9825664 -2.36075,0 l -5.79727,12.4926312 c -1.4045,3.031919 -3.97442,5.446225 -7.20177,6.765672 l -13.32776,5.474298 c -1.01601,0.4211 -1.0459,1.796693 0,2.217793 z\" style=\"stroke-width:2.8964;fill-opacity:1\" /> <path d=\"m 233.09331,192.98627 -14.13459,-5.7831 c -3.40665,-1.40367 -6.12599,-3.95834 -7.62013,-7.1587 l -6.15587,-13.27868 c -0.47813,-1.03872 -2.03203,-1.03872 -2.51016,0 l -6.15587,13.27868 c -1.49414,3.20036 -4.21348,5.75503 -7.62013,7.1587 l -14.13459,5.81118 c -1.10567,0.44917 -1.10567,1.90898 0,2.35816 l 14.40354,5.97961 c 3.40664,1.40367 6.12598,3.98642 7.59024,7.21485 l 5.97658,13.02602 c 0.47812,1.03872 2.03203,1.03872 2.51016,0 l 6.15586,-13.25061 c 1.49415,-3.20036 4.21349,-5.75503 7.62013,-7.1587 l 14.1346,-5.7831 c 1.10566,-0.44917 1.10566,-1.90899 0,-2.35816 z\" style=\"stroke-width:2.8964;stroke-opacity:1\" /> </svg> ";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\"> <g transform=\"scale(1.2 1.2) translate(-2 -0.5)\"> <path d=\"M 22,12.5 A 1.49995,1.49995 0 0 0 20.50006,11 H 20 V 10 A 3,3 0 0 0 17,7 H 13 V 5.7226 a 2,2 0 1 0 -2,0 V 7 H 7 a 3,3 0 0 0 -3,3 v 1 H 3.49994 a 1.5,1.5 0 0 0 0,3 H 4 v 1 A 3.00128,3.00128 0 0 0 6.20251,17.89282 1.03113,1.03113 0 0 1 7,18.86975 v 0.716 a 0.99928,0.99928 0 0 0 1.00726,1.002 0.9792,0.9792 0 0 0 0.69983,-0.29486 l 2,-2 A 1,1 0 0 1 11.41425,18 H 17 a 3,3 0 0 0 3,-3 v -1 h 0.50006 A 1.49995,1.49995 0 0 0 22,12.5 Z M 19,15 a 2.00226,2.00226 0 0 1 -2,2 H 11.41425 A 1.987,1.987 0 0 0 10,17.58575 l -2,2 v -0.716 A 2.02082,2.02082 0 0 0 6.46771,16.92865 2.00439,2.00439 0 0 1 5,15 V 10 A 2.00226,2.00226 0 0 1 7,8 h 10 a 2.00222,2.00222 0 0 1 2,2 z M 10,12.5 A 1.5,1.5 0 1 1 8.5,11 1.5,1.5 0 0 1 10,12.5 Z m 7,0 A 1.5,1.5 0 1 1 15.5,11 1.5,1.5 0 0 1 17,12.5 Z\"/> </g> </svg> ";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
export interface AiAssistantSettings {
|
|
7
|
+
/** Callback function for AI assistant to process and return the result */
|
|
8
|
+
aiAssistantCallback?: (prompt: string, htmlFragment: string) => Promise<string>;
|
|
9
|
+
/** Prompt for common prefix */
|
|
10
|
+
aiCommonPrefixPrompt: string;
|
|
11
|
+
/** Prompt for common suffix */
|
|
12
|
+
aiCommonSuffixPrompt: string;
|
|
13
|
+
/** Prompt for improving writing quality */
|
|
14
|
+
aiImproveWritingPrompt: string;
|
|
15
|
+
/** Prompt for making text shorter */
|
|
16
|
+
aiMakeShorterPrompt: string;
|
|
17
|
+
/** Prompt for making text longer */
|
|
18
|
+
aiMakeLongerPrompt: string;
|
|
19
|
+
/** Prompt for simplifying language */
|
|
20
|
+
aiSimplifyLanguagePrompt: string;
|
|
21
|
+
/** Prompt for summarizing text */
|
|
22
|
+
aiSummarizePrompt: string;
|
|
23
|
+
/** Prompt for continuing text */
|
|
24
|
+
aiContinuePrompt: string;
|
|
25
|
+
/** Prompt for changing tone to professional */
|
|
26
|
+
aiChangeToneProfessionalPrompt: string;
|
|
27
|
+
/** Prompt for changing tone to friendly */
|
|
28
|
+
aiChangeToneFriendlyPrompt: string;
|
|
29
|
+
/** Prompt for changing tone to formal */
|
|
30
|
+
aiChangeToneFormalPrompt: string;
|
|
31
|
+
/** Prompt for changing tone to casual */
|
|
32
|
+
aiChangeToneCasualPrompt: string;
|
|
33
|
+
/** Prompt for changing tone to direct */
|
|
34
|
+
aiChangeToneDirectPrompt: string;
|
|
35
|
+
/** Prompt for changing tone to confident */
|
|
36
|
+
aiChangeToneConfidentPrompt: string;
|
|
37
|
+
/** Prompt for changing style to business */
|
|
38
|
+
aiChangeStyleBusinessPrompt: string;
|
|
39
|
+
/** Prompt for changing style to legal */
|
|
40
|
+
aiChangeStyleLegalPrompt: string;
|
|
41
|
+
/** Prompt for changing style to journalism */
|
|
42
|
+
aiChangeStyleJournalismPrompt: string;
|
|
43
|
+
/** Prompt for changing style to poetic */
|
|
44
|
+
aiChangeStylePoeticPrompt: string;
|
|
45
|
+
/** Prompt for translating text to Spanish */
|
|
46
|
+
aiTranslateToSpanishPrompt: string;
|
|
47
|
+
/** Prompt for translating text to French */
|
|
48
|
+
aiTranslateToFrenchPrompt: string;
|
|
49
|
+
/** Prompt for translating text to German */
|
|
50
|
+
aiTranslateToGermanPrompt: string;
|
|
51
|
+
/** Prompt for translating text to Italian */
|
|
52
|
+
aiTranslateToItalianPrompt: string;
|
|
53
|
+
/** Prompt for translating text to Portuguese */
|
|
54
|
+
aiTranslateToPortuguesePrompt: string;
|
|
55
|
+
/** Prompt for translating text to English */
|
|
56
|
+
aiTranslateToEnglishPrompt: string;
|
|
57
|
+
/** Prompt for translating text to Chinese */
|
|
58
|
+
aiTranslateToChinesePrompt: string;
|
|
59
|
+
/** Prompt for translating text to Japanese */
|
|
60
|
+
aiTranslateToJapanesePrompt: string;
|
|
61
|
+
/** Prompt for translating text to Korean */
|
|
62
|
+
aiTranslateToKoreanPrompt: string;
|
|
63
|
+
/** Prompt for translating text to Russian */
|
|
64
|
+
aiTranslateToRussianPrompt: string;
|
|
65
|
+
/** Prompt for translating text to Arabic */
|
|
66
|
+
aiTranslateToArabicPrompt: string;
|
|
67
|
+
}
|
|
68
|
+
declare module 'jodit/config' {
|
|
69
|
+
interface Config {
|
|
70
|
+
aiAssistant: AiAssistantSettings;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import { Icon } from "jodit/esm/core/ui/icon.js";
|
|
7
|
+
import magicWandIcon from "./ai-assistant.svg.js";
|
|
8
|
+
import chatBotIcon from "./chat-bot.svg.js";
|
|
9
|
+
import { Config } from "jodit/esm/config.js";
|
|
10
|
+
const aiAssistantDefaults = {
|
|
11
|
+
aiCommonPrefixPrompt: '',
|
|
12
|
+
aiCommonSuffixPrompt: '',
|
|
13
|
+
aiImproveWritingPrompt: 'It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.',
|
|
14
|
+
aiMakeShorterPrompt: 'Please condense this content to make it more concise, while preserving the key messages, language and information.',
|
|
15
|
+
aiMakeLongerPrompt: 'Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.',
|
|
16
|
+
aiSimplifyLanguagePrompt: 'The language used here needs to be simplified for easier understanding, without altering the core information and the original language.',
|
|
17
|
+
aiSummarizePrompt: 'Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.',
|
|
18
|
+
aiContinuePrompt: 'Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.',
|
|
19
|
+
aiChangeToneProfessionalPrompt: 'Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.',
|
|
20
|
+
aiChangeToneFriendlyPrompt: 'It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.',
|
|
21
|
+
aiChangeToneFormalPrompt: 'Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.',
|
|
22
|
+
aiChangeToneCasualPrompt: 'Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.',
|
|
23
|
+
aiChangeToneDirectPrompt: 'Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.',
|
|
24
|
+
aiChangeToneConfidentPrompt: 'Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.',
|
|
25
|
+
aiChangeStyleBusinessPrompt: 'Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.',
|
|
26
|
+
aiChangeStyleLegalPrompt: 'Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.',
|
|
27
|
+
aiChangeStyleJournalismPrompt: 'Convert this content into a journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.',
|
|
28
|
+
aiChangeStylePoeticPrompt: 'Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.',
|
|
29
|
+
aiTranslateToSpanishPrompt: 'Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.',
|
|
30
|
+
aiTranslateToFrenchPrompt: 'Translate this content into French, ensuring the translation is accurate and maintains the original meaning.',
|
|
31
|
+
aiTranslateToGermanPrompt: 'Translate this content into German, ensuring the translation is accurate and maintains the original meaning.',
|
|
32
|
+
aiTranslateToItalianPrompt: 'Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.',
|
|
33
|
+
aiTranslateToPortuguesePrompt: 'Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.',
|
|
34
|
+
aiTranslateToEnglishPrompt: 'Translate this content into English, ensuring the translation is accurate and maintains the original meaning.',
|
|
35
|
+
aiTranslateToChinesePrompt: 'Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.',
|
|
36
|
+
aiTranslateToJapanesePrompt: 'Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.',
|
|
37
|
+
aiTranslateToKoreanPrompt: 'Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.',
|
|
38
|
+
aiTranslateToRussianPrompt: 'Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.',
|
|
39
|
+
aiTranslateToArabicPrompt: 'Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning.'
|
|
40
|
+
};
|
|
41
|
+
Config.prototype.aiAssistant = aiAssistantDefaults;
|
|
42
|
+
Icon.set('ai-assistant', chatBotIcon);
|
|
43
|
+
Icon.set('ai-commands', magicWandIcon);
|
|
44
|
+
Config.prototype.controls['ai-commands'] = {
|
|
45
|
+
isDisabled(editor) {
|
|
46
|
+
return !editor.o.aiAssistant.aiAssistantCallback;
|
|
47
|
+
},
|
|
48
|
+
tooltip: 'AI Commands',
|
|
49
|
+
list: {
|
|
50
|
+
aiImproveWritingPrompt: 'Improve writing',
|
|
51
|
+
aiMakeShorterPrompt: 'Make shorter',
|
|
52
|
+
aiMakeLongerPrompt: 'Make longer',
|
|
53
|
+
aiSimplifyLanguagePrompt: 'Simplify language',
|
|
54
|
+
aiSummarizePrompt: 'Summarize',
|
|
55
|
+
aiContinuePrompt: 'Continue',
|
|
56
|
+
aiChangeToneProfessionalPrompt: 'Change tone to professional',
|
|
57
|
+
aiChangeToneFriendlyPrompt: 'Change tone to friendly',
|
|
58
|
+
aiChangeToneFormalPrompt: 'Change tone to formal',
|
|
59
|
+
aiChangeToneCasualPrompt: 'Change tone to casual',
|
|
60
|
+
aiChangeToneDirectPrompt: 'Change tone to direct',
|
|
61
|
+
aiChangeToneConfidentPrompt: 'Change tone to confident',
|
|
62
|
+
aiChangeStyleBusinessPrompt: 'Change style to business',
|
|
63
|
+
aiChangeStyleLegalPrompt: 'Change style to legal',
|
|
64
|
+
aiChangeStyleJournalismPrompt: 'Change style of journalism',
|
|
65
|
+
aiChangeStylePoeticPrompt: 'Change style to poetic',
|
|
66
|
+
aiTranslateToSpanishPrompt: 'Translate to Spanish',
|
|
67
|
+
aiTranslateToFrenchPrompt: 'Translate to French',
|
|
68
|
+
aiTranslateToGermanPrompt: 'Translate to German',
|
|
69
|
+
aiTranslateToItalianPrompt: 'Translate to Italian',
|
|
70
|
+
aiTranslateToPortuguesePrompt: 'Translate to Portuguese',
|
|
71
|
+
aiTranslateToEnglishPrompt: 'Translate to English',
|
|
72
|
+
aiTranslateToChinesePrompt: 'Translate to Chinese',
|
|
73
|
+
aiTranslateToJapanesePrompt: 'Translate to Japanese',
|
|
74
|
+
aiTranslateToKoreanPrompt: 'Translate to Korean',
|
|
75
|
+
aiTranslateToRussianPrompt: 'Translate to Russian',
|
|
76
|
+
aiTranslateToArabicPrompt: 'Translate to Arabic'
|
|
77
|
+
},
|
|
78
|
+
exec: (editor, event, { control }) => {
|
|
79
|
+
editor.e.fire('generateAiAssistantForm.ai-assistant', control.name);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
Config.prototype.controls['ai-assistant'] = {
|
|
83
|
+
isDisabled(editor) {
|
|
84
|
+
return !editor.o.aiAssistant.aiAssistantCallback;
|
|
85
|
+
},
|
|
86
|
+
hotkeys: ['ctrl+a+i', 'cmd+a+i'],
|
|
87
|
+
tooltip: 'AI Assistant',
|
|
88
|
+
exec: (editor, current, close) => {
|
|
89
|
+
editor.e.fire('generateAiAssistantForm.ai-assistant');
|
|
90
|
+
}
|
|
91
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
4
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
5
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
6
|
+
*/
|
|
7
|
+
export default {
|
|
8
|
+
aiAssistant: 'AI Assistant',
|
|
9
|
+
aiCommands: 'AI Commands',
|
|
10
|
+
'AI Assistant': 'AI Assistant',
|
|
11
|
+
Prompt: 'Prompt',
|
|
12
|
+
'Ask AI to improve generated text': 'Ask AI to improve generated text',
|
|
13
|
+
Submit: 'Submit'
|
|
14
|
+
};
|