jodit 3.20.2 → 3.20.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/build/jodit.css +211 -237
- package/build/jodit.es2018.css +160 -161
- package/build/jodit.es2018.en.css +160 -161
- package/build/jodit.es2018.en.js +257 -120
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +283 -137
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +240 -129
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/build/plugins/debug/debug.es2018.en.js +1 -1
- package/build/plugins/debug/debug.es2018.js +1 -1
- package/build/plugins/debug/debug.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.css +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.en.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.es2018.js +1 -1
- package/build/plugins/speech-recognize/speech-recognize.js +1 -1
- package/build/vdom.css +1 -1
- package/build/vdom.js +46 -1
- package/package.json +28 -24
- package/src/README.md +2 -0
- package/src/config.ts +12 -0
- package/src/core/async/README.md +2 -0
- package/src/core/async/async.test.js +183 -0
- package/src/core/async/async.ts +21 -2
- package/src/core/component/README.md +2 -0
- package/src/core/create/README.md +2 -0
- package/src/core/decorators/cache/README.md +2 -0
- package/src/core/decorators/component/README.md +2 -0
- package/src/core/decorators/debounce/README.md +2 -0
- package/src/core/decorators/hook/README.md +2 -0
- package/src/core/decorators/idle/README.md +2 -0
- package/src/core/decorators/nonenumerable/README.md +2 -0
- package/src/core/decorators/persistent/README.md +2 -0
- package/src/core/decorators/wait/README.md +2 -0
- package/src/core/decorators/watch/README.md +2 -0
- package/src/core/dom/README.md +2 -0
- package/src/core/event-emitter/README.md +2 -0
- package/src/core/helpers/README.md +2 -0
- package/src/core/plugin/README.md +2 -0
- package/src/core/request/README.md +2 -0
- package/src/core/selection/README.md +2 -0
- package/src/core/storage/README.md +2 -0
- package/src/core/vdom/README.md +2 -0
- package/src/core/view/README.md +2 -0
- package/src/core/view/view.ts +9 -1
- package/src/index.ts +7 -4
- package/src/jodit.ts +4 -2
- package/src/langs/index.ts +7 -4
- package/{types/types/core.ts → src/langs/keys.js} +1 -10
- package/src/modules/README.md +1 -1
- package/src/modules/dialog/README.md +2 -0
- package/src/modules/dialog/dialog.test.screenshot.js +55 -0
- package/src/modules/file-browser/README.md +12 -4
- package/src/modules/file-browser/builders/item.ts +1 -0
- package/src/modules/file-browser/file-browser.test.screenshot.js +1 -1
- package/src/modules/file-browser/file-browser.ts +4 -23
- package/src/modules/file-browser/styles/file-browser.less +0 -26
- package/src/modules/image-editor/README.md +1 -1
- package/src/modules/image-editor/image-editor.test.screenshot.js +1 -1
- package/src/modules/index.ts +1 -0
- package/src/modules/messages/README.md +33 -0
- package/src/modules/messages/message.ts +30 -0
- package/src/modules/messages/messages.less +71 -0
- package/src/modules/messages/messages.test.js +93 -0
- package/src/modules/messages/messages.test.screenshot.js +25 -0
- package/src/modules/messages/messages.ts +156 -0
- package/src/modules/uploader/README.md +2 -0
- package/src/plugins/color/color.test.screenshot.js +26 -0
- package/src/plugins/image-properties/image-properties.test.screenshot.js +27 -0
- package/src/plugins/index.ts +0 -1
- package/src/plugins/limit/README.md +39 -14
- package/src/plugins/limit/limit.test.js +30 -4
- package/src/plugins/limit/limit.ts +28 -21
- package/src/plugins/link/README.md +1 -1
- package/src/plugins/link/link.test.screenshot.js +26 -0
- package/src/plugins/search/search.test.screenshot.js +38 -0
- package/src/plugins/symbols/symbols.test.screenshot.js +25 -0
- package/src/styles/icons/README.md +2 -0
- package/src/styles/variables.less +7 -3
- package/src/types/async.d.ts +9 -2
- package/src/types/{core.ts → core.d.ts} +0 -0
- package/src/types/file-browser.d.ts +15 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/messages.d.ts +10 -0
- package/src/types/view.d.ts +3 -0
- package/tsconfig.json +3 -0
- package/types/config.d.ts +0 -506
- package/types/core/async/async.d.ts +6 -34
- package/types/core/async/index.d.ts +0 -3
- package/types/core/component/component.d.ts +0 -81
- package/types/core/component/index.d.ts +0 -3
- package/types/core/component/statuses.d.ts +0 -3
- package/types/core/component/view-component.d.ts +0 -13
- package/types/core/constants.d.ts +0 -60
- package/types/core/create/create.d.ts +0 -32
- package/types/core/create/index.d.ts +0 -3
- package/types/core/decorators/component/component.d.ts +0 -9
- package/types/core/decorators/debounce/debounce.d.ts +0 -8
- package/types/core/decorators/hook/hook.d.ts +0 -8
- package/types/core/decorators/idle/idle.d.ts +0 -5
- package/types/core/decorators/index.d.ts +0 -5
- package/types/core/decorators/nonenumerable/nonenumerable.d.ts +0 -5
- package/types/core/decorators/persistent/persistent.d.ts +0 -5
- package/types/core/decorators/wait/wait.d.ts +0 -5
- package/types/core/decorators/watch/watch.d.ts +0 -8
- package/types/core/dom/dom.d.ts +0 -171
- package/types/core/dom/index.d.ts +0 -3
- package/types/core/dom/lazy-walker.d.ts +0 -3
- package/types/core/event-emitter/event-emitter.d.ts +0 -99
- package/types/core/event-emitter/eventify.d.ts +0 -25
- package/types/core/event-emitter/index.d.ts +0 -3
- package/types/core/event-emitter/observable.d.ts +0 -38
- package/types/core/event-emitter/store.d.ts +0 -3
- package/types/core/global.d.ts +0 -12
- package/types/core/helpers/array/as-array.d.ts +0 -3
- package/types/core/helpers/array/index.d.ts +0 -3
- package/types/core/helpers/array/split-array.d.ts +0 -6
- package/types/core/helpers/array/to-array.d.ts +0 -4
- package/types/core/helpers/async/index.d.ts +0 -3
- package/types/core/helpers/async/set-timeout.d.ts +0 -9
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -6
- package/types/core/helpers/checker/index.d.ts +0 -3
- package/types/core/helpers/checker/is-array.d.ts +0 -6
- package/types/core/helpers/checker/is-boolean.d.ts +0 -3
- package/types/core/helpers/checker/is-equal.d.ts +0 -3
- package/types/core/helpers/checker/is-function.d.ts +0 -6
- package/types/core/helpers/checker/is-html-from-word.d.ts +0 -6
- package/types/core/helpers/checker/is-html.d.ts +0 -3
- package/types/core/helpers/checker/is-imp-interface.d.ts +0 -12
- package/types/core/helpers/checker/is-int.d.ts +0 -3
- package/types/core/helpers/checker/is-jodit-object.d.ts +0 -6
- package/types/core/helpers/checker/is-native-function.d.ts +0 -6
- package/types/core/helpers/checker/is-number.d.ts +0 -6
- package/types/core/helpers/checker/is-numeric.d.ts +0 -3
- package/types/core/helpers/checker/is-plain-object.d.ts +0 -6
- package/types/core/helpers/checker/is-promise.d.ts +0 -3
- package/types/core/helpers/checker/is-string.d.ts +0 -6
- package/types/core/helpers/checker/is-url.d.ts +0 -6
- package/types/core/helpers/checker/is-valid-name.d.ts +0 -6
- package/types/core/helpers/checker/is-view-object.d.ts +0 -6
- package/types/core/helpers/checker/is-void.d.ts +0 -6
- package/types/core/helpers/checker/is-window.d.ts +0 -3
- package/types/core/helpers/color/color-to-hex.d.ts +0 -16
- package/types/core/helpers/color/index.d.ts +0 -3
- package/types/core/helpers/html/apply-styles.d.ts +0 -5
- package/types/core/helpers/html/clean-from-word.d.ts +0 -4
- package/types/core/helpers/html/htmlspecialchars.d.ts +0 -6
- package/types/core/helpers/html/index.d.ts +0 -3
- package/types/core/helpers/html/nl2br.d.ts +0 -6
- package/types/core/helpers/html/safe-html.d.ts +0 -3
- package/types/core/helpers/html/strip-tags.d.ts +0 -3
- package/types/core/helpers/index.d.ts +0 -5
- package/types/core/helpers/normalize/index.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-color.d.ts +0 -6
- package/types/core/helpers/normalize/normalize-key-aliases.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-license.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-path.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-relative-path.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-size.d.ts +0 -6
- package/types/core/helpers/normalize/normalize-url.d.ts +0 -3
- package/types/core/helpers/size/get-content-width.d.ts +0 -3
- package/types/core/helpers/size/get-scroll-parent.d.ts +0 -3
- package/types/core/helpers/size/index.d.ts +0 -3
- package/types/core/helpers/size/inner-width.d.ts +0 -3
- package/types/core/helpers/size/offset.d.ts +0 -7
- package/types/core/helpers/size/position.d.ts +0 -3
- package/types/core/helpers/string/camel-case.d.ts +0 -6
- package/types/core/helpers/string/fuzzy-search-index.d.ts +0 -4
- package/types/core/helpers/string/i18n.d.ts +0 -31
- package/types/core/helpers/string/index.d.ts +0 -3
- package/types/core/helpers/string/kebab-case.d.ts +0 -3
- package/types/core/helpers/string/stringify.d.ts +0 -3
- package/types/core/helpers/string/trim.d.ts +0 -7
- package/types/core/helpers/string/ucfirst.d.ts +0 -6
- package/types/core/helpers/utils/align.d.ts +0 -12
- package/types/core/helpers/utils/append-script.d.ts +0 -12
- package/types/core/helpers/utils/assert.d.ts +0 -1
- package/types/core/helpers/utils/browser.d.ts +0 -14
- package/types/core/helpers/utils/build-query.d.ts +0 -6
- package/types/core/helpers/utils/complete-url.d.ts +0 -3
- package/types/core/helpers/utils/config-proto.d.ts +0 -33
- package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +0 -3
- package/types/core/helpers/utils/css.d.ts +0 -6
- package/types/core/helpers/utils/ctrl-key.d.ts +0 -7
- package/types/core/helpers/utils/data-bind.d.ts +0 -3
- package/types/core/helpers/utils/default-language.d.ts +0 -3
- package/types/core/helpers/utils/error/error.d.ts +0 -3
- package/types/core/helpers/utils/error/errors/abort-error.d.ts +0 -3
- package/types/core/helpers/utils/error/errors/connection-error.d.ts +0 -3
- package/types/core/helpers/utils/error/errors/index.d.ts +0 -3
- package/types/core/helpers/utils/error/errors/options-error.d.ts +0 -3
- package/types/core/helpers/utils/error/index.d.ts +0 -3
- package/types/core/helpers/utils/get-class-name.d.ts +0 -3
- package/types/core/helpers/utils/get.d.ts +0 -22
- package/types/core/helpers/utils/human-size-to-bytes.d.ts +0 -7
- package/types/core/helpers/utils/index.d.ts +0 -3
- package/types/core/helpers/utils/mark-deprecated.d.ts +0 -10
- package/types/core/helpers/utils/parse-query.d.ts +0 -6
- package/types/core/helpers/utils/print.d.ts +0 -9
- package/types/core/helpers/utils/reset.d.ts +0 -10
- package/types/core/helpers/utils/scroll-into-view.d.ts +0 -3
- package/types/core/helpers/utils/selector.d.ts +0 -29
- package/types/core/helpers/utils/set.d.ts +0 -16
- package/types/core/helpers/utils/stack.d.ts +0 -3
- package/types/core/helpers/utils/utils.d.ts +0 -36
- package/types/core/helpers/utils/val.d.ts +0 -3
- package/types/core/plugin/index.d.ts +0 -3
- package/types/core/plugin/plugin-system.d.ts +0 -48
- package/types/core/plugin/plugin.d.ts +0 -10
- package/types/core/request/ajax.d.ts +0 -8
- package/types/core/request/config.d.ts +0 -6
- package/types/core/request/index.d.ts +0 -3
- package/types/core/request/response.d.ts +0 -3
- package/types/core/selection/helpers/index.d.ts +0 -3
- package/types/core/selection/helpers/move-node-inside-start.d.ts +0 -7
- package/types/core/selection/index.d.ts +0 -3
- package/types/core/selection/select.d.ts +0 -180
- package/types/core/selection/style/api/element-has-same-style.d.ts +0 -7
- package/types/core/selection/style/api/extract.d.ts +0 -16
- package/types/core/selection/style/api/finite-state-machine.d.ts +0 -3
- package/types/core/selection/style/api/get-suit-child.d.ts +0 -8
- package/types/core/selection/style/api/get-suit-parent.d.ts +0 -8
- package/types/core/selection/style/api/is-inside-invisible-element.d.ts +0 -4
- package/types/core/selection/style/api/is-normal-node.d.ts +0 -4
- package/types/core/selection/style/api/is-suit-element.d.ts +0 -24
- package/types/core/selection/style/api/toggle/toggle-css.d.ts +0 -4
- package/types/core/selection/style/api/toggle/toggle-ordered-list.d.ts +0 -4
- package/types/core/selection/style/api/toggle-commit-styles.d.ts +0 -5
- package/types/core/selection/style/api/unwrap-children.d.ts +0 -4
- package/types/core/selection/style/api/wrap-and-commit-style.d.ts +0 -4
- package/types/core/selection/style/api/wrap-ordered-list.d.ts +0 -5
- package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +0 -4
- package/types/core/selection/style/apply-style.d.ts +0 -3
- package/types/core/selection/style/commit-style.d.ts +0 -9
- package/types/core/storage/engines/local-storage-provider.d.ts +0 -9
- package/types/core/storage/engines/memory-storage-provider.d.ts +0 -3
- package/types/core/storage/index.d.ts +0 -3
- package/types/core/storage/storage.d.ts +0 -5
- package/types/core/traits/dlgs.d.ts +0 -3
- package/types/core/traits/elms.d.ts +0 -9
- package/types/core/traits/index.d.ts +0 -3
- package/types/core/traits/mods.d.ts +0 -11
- package/types/core/ui/button/button/button.d.ts +0 -32
- package/types/core/ui/button/group/group.d.ts +0 -6
- package/types/core/ui/button/index.d.ts +0 -5
- package/types/core/ui/button/tooltip/tooltip.d.ts +0 -8
- package/types/core/ui/element.d.ts +0 -27
- package/types/core/ui/form/block/block.d.ts +0 -4
- package/types/core/ui/form/form.d.ts +0 -7
- package/types/core/ui/form/index.d.ts +0 -3
- package/types/core/ui/form/inputs/area/area.d.ts +0 -7
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +0 -8
- package/types/core/ui/form/inputs/file/file.d.ts +0 -4
- package/types/core/ui/form/inputs/index.d.ts +0 -3
- package/types/core/ui/form/inputs/input/input.d.ts +0 -18
- package/types/core/ui/form/inputs/select/select.d.ts +0 -10
- package/types/core/ui/form/validators/index.d.ts +0 -3
- package/types/core/ui/form/validators/input.d.ts +0 -9
- package/types/core/ui/form/validators/select.d.ts +0 -6
- package/types/core/ui/group/group.d.ts +0 -32
- package/types/core/ui/group/index.d.ts +0 -3
- package/types/core/ui/group/list.d.ts +0 -16
- package/types/core/ui/group/separator.d.ts +0 -3
- package/types/core/ui/group/spacer.d.ts +0 -3
- package/types/core/ui/helpers/buttons.d.ts +0 -3
- package/types/core/ui/helpers/get-control-type.d.ts +0 -6
- package/types/core/ui/helpers/get-strong-control-types.d.ts +0 -3
- package/types/core/ui/icon.d.ts +0 -15
- package/types/core/ui/index.d.ts +0 -5
- package/types/core/ui/popup/index.d.ts +0 -3
- package/types/core/ui/popup/popup.d.ts +0 -35
- package/types/core/ui/progress-bar/progress-bar.d.ts +0 -10
- package/types/core/vdom/helpers/index.d.ts +9 -0
- package/types/core/vdom/index.d.ts +8 -0
- package/types/core/vdom/interface.d.ts +48 -0
- package/types/core/vdom/render/index.d.ts +23 -0
- package/types/core/vdom/v-dom-jodit.d.ts +15 -0
- package/types/core/view/view-with-toolbar.d.ts +0 -22
- package/types/core/view/view.d.ts +2 -65
- package/types/index.d.ts +1 -6
- package/types/jodit.d.ts +5 -257
- package/types/langs/index.d.ts +0 -5
- package/types/modules/context-menu/context-menu.d.ts +0 -20
- package/types/modules/dialog/alert.d.ts +0 -17
- package/types/modules/dialog/confirm.d.ts +0 -17
- package/types/modules/dialog/dialog.d.ts +0 -115
- package/types/modules/dialog/index.d.ts +0 -5
- package/types/modules/dialog/prompt.d.ts +0 -20
- package/types/modules/file-browser/builders/context-menu.d.ts +0 -3
- package/types/modules/file-browser/builders/elements-map.d.ts +0 -6
- package/types/modules/file-browser/builders/item.d.ts +0 -3
- package/types/modules/file-browser/data-provider.d.ts +0 -69
- package/types/modules/file-browser/factories.d.ts +0 -3
- package/types/modules/file-browser/fetch/delete-file.d.ts +0 -6
- package/types/modules/file-browser/fetch/load-items.d.ts +0 -6
- package/types/modules/file-browser/fetch/load-tree.d.ts +0 -6
- package/types/modules/file-browser/file-browser.d.ts +0 -36
- package/types/modules/file-browser/index.d.ts +0 -5
- package/types/modules/file-browser/listeners/native-listeners.d.ts +0 -3
- package/types/modules/file-browser/listeners/self-listeners.d.ts +0 -3
- package/types/modules/file-browser/listeners/state-listeners.d.ts +0 -6
- package/types/modules/file-browser/ui/index.d.ts +0 -3
- package/types/modules/history/command.d.ts +0 -3
- package/types/modules/history/history.d.ts +0 -30
- package/types/modules/history/snapshot.d.ts +0 -40
- package/types/modules/history/stack.d.ts +0 -3
- package/types/modules/image-editor/image-editor.d.ts +1 -54
- package/types/modules/image-editor/templates/form.d.ts +0 -3
- package/types/modules/index.d.ts +1 -5
- package/types/modules/messages/message.d.ts +14 -0
- package/types/modules/messages/messages.d.ts +27 -0
- package/types/modules/status-bar/status-bar.d.ts +0 -20
- package/types/modules/table/table.d.ts +0 -57
- package/types/modules/toolbar/button/button.d.ts +1 -41
- package/types/modules/toolbar/button/content.d.ts +0 -6
- package/types/modules/toolbar/button/index.d.ts +0 -3
- package/types/modules/toolbar/collection/collection.d.ts +0 -23
- package/types/modules/toolbar/collection/editor-collection.d.ts +0 -19
- package/types/modules/toolbar/factory.d.ts +0 -11
- package/types/modules/uploader/config.d.ts +0 -6
- package/types/modules/uploader/helpers/build-data.d.ts +0 -3
- package/types/modules/uploader/helpers/data-uri-to-blob.d.ts +0 -6
- package/types/modules/uploader/helpers/index.d.ts +0 -3
- package/types/modules/uploader/helpers/process-old-browser-drag.d.ts +0 -3
- package/types/modules/uploader/helpers/send-files.d.ts +0 -6
- package/types/modules/uploader/helpers/send.d.ts +0 -3
- package/types/modules/uploader/uploader.d.ts +0 -35
- package/types/modules/widget/color-picker/color-picker.d.ts +0 -22
- package/types/modules/widget/file-selector/file-selector.d.ts +0 -41
- package/types/modules/widget/index.d.ts +0 -5
- package/types/modules/widget/tabs/tabs.d.ts +0 -22
- package/types/plugins/about/about.d.ts +0 -5
- package/types/plugins/add-new-line/add-new-line.d.ts +0 -9
- package/types/plugins/add-new-line/config.d.ts +0 -22
- package/types/plugins/backspace/backspace.d.ts +0 -14
- package/types/plugins/backspace/cases/check-join-neighbors.d.ts +0 -6
- package/types/plugins/backspace/cases/check-join-two-lists.d.ts +0 -16
- package/types/plugins/backspace/cases/check-not-collapsed.d.ts +0 -16
- package/types/plugins/backspace/cases/check-remove-char.d.ts +0 -16
- package/types/plugins/backspace/cases/check-remove-content-not-editable.d.ts +0 -7
- package/types/plugins/backspace/cases/check-remove-empty-neighbor.d.ts +0 -16
- package/types/plugins/backspace/cases/check-remove-empty-parent.d.ts +0 -17
- package/types/plugins/backspace/cases/check-remove-unbreakable-element.d.ts +0 -17
- package/types/plugins/backspace/cases/check-table-cell.d.ts +0 -17
- package/types/plugins/backspace/cases/check-unwrap-first-list-item.d.ts +0 -17
- package/types/plugins/backspace/cases/index.d.ts +1 -1
- package/types/plugins/backspace/helpers.d.ts +0 -7
- package/types/plugins/bold/bold.d.ts +0 -8
- package/types/plugins/class-span/class-span.d.ts +0 -27
- package/types/plugins/clean-html/clean-html.d.ts +0 -17
- package/types/plugins/clean-html/config.d.ts +0 -73
- package/types/plugins/clean-html/helpers/get-hash.d.ts +0 -6
- package/types/plugins/clean-html/helpers/index.d.ts +0 -3
- package/types/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.d.ts +0 -10
- package/types/plugins/clean-html/helpers/remove-format/remove-format-for-selection.d.ts +0 -7
- package/types/plugins/clean-html/helpers/visitor/filters/allow-attributes.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/remove-inv-text-nodes.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/replace-old-tags.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/sanitize-attributes.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/filters/try-remove-node.d.ts +0 -6
- package/types/plugins/clean-html/helpers/visitor/visit-node-walker.d.ts +0 -6
- package/types/plugins/clipboard/clipboard.d.ts +0 -10
- package/types/plugins/color/color.d.ts +0 -8
- package/types/plugins/copy-format/copy-format.d.ts +0 -5
- package/types/plugins/copy-format/langs/index.d.ts +25 -0
- package/types/plugins/debug/debug.d.ts +11 -0
- package/types/plugins/drag-and-drop/drag-and-drop.d.ts +0 -5
- package/types/plugins/drag-and-drop-element/config.d.ts +0 -3
- package/types/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +0 -26
- package/types/plugins/dtd/after-insert/index.d.ts +0 -4
- package/types/plugins/dtd/after-insert/remove-extra-br.d.ts +0 -9
- package/types/plugins/dtd/before-insert/check-block-nesting.d.ts +0 -9
- package/types/plugins/dtd/before-insert/index.d.ts +0 -4
- package/types/plugins/dtd/config.d.ts +0 -12
- package/types/plugins/enter/enter.d.ts +0 -11
- package/types/plugins/enter/helpers/check-br.d.ts +0 -7
- package/types/plugins/enter/helpers/check-unsplittable-box.d.ts +0 -7
- package/types/plugins/enter/helpers/get-block-wrapper.d.ts +0 -7
- package/types/plugins/enter/helpers/has-previous-block.d.ts +0 -6
- package/types/plugins/enter/helpers/index.d.ts +0 -3
- package/types/plugins/enter/helpers/insert-paragraph.d.ts +0 -7
- package/types/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +0 -6
- package/types/plugins/enter/helpers/process-empty-li-leaf.d.ts +0 -7
- package/types/plugins/enter/helpers/split-fragment.d.ts +0 -8
- package/types/plugins/enter/helpers/wrap-text.d.ts +0 -8
- package/types/plugins/file/file.d.ts +0 -5
- package/types/plugins/focus/focus.d.ts +0 -5
- package/types/plugins/font/font.d.ts +0 -8
- package/types/plugins/format-block/format-block.d.ts +0 -8
- package/types/plugins/fullsize/config.d.ts +0 -22
- package/types/plugins/fullsize/fullsize.d.ts +0 -8
- package/types/plugins/hotkeys/config.d.ts +0 -3
- package/types/plugins/hotkeys/hotkeys.d.ts +0 -10
- package/types/plugins/hr/hr.d.ts +0 -5
- package/types/plugins/iframe/config.d.ts +0 -49
- package/types/plugins/iframe/iframe.d.ts +0 -9
- package/types/plugins/image/image.d.ts +0 -5
- package/types/plugins/image-processor/config.d.ts +0 -3
- package/types/plugins/image-processor/image-processor.d.ts +0 -8
- package/types/plugins/image-properties/config.d.ts +0 -42
- package/types/plugins/image-properties/image-properties.d.ts +0 -42
- package/types/plugins/image-properties/templates/form.d.ts +0 -3
- package/types/plugins/image-properties/templates/main-tab.d.ts +0 -3
- package/types/plugins/image-properties/templates/position-tab.d.ts +0 -3
- package/types/plugins/indent/config.d.ts +0 -3
- package/types/plugins/indent/helpers.d.ts +0 -4
- package/types/plugins/indent/indent.d.ts +0 -8
- package/types/plugins/index.d.ts +0 -6
- package/types/plugins/inline-popup/config/config.d.ts +0 -3
- package/types/plugins/inline-popup/config/items/a.d.ts +8 -0
- package/types/plugins/inline-popup/config/items/cells.d.ts +8 -0
- package/types/plugins/inline-popup/config/items/iframe.d.ts +8 -0
- package/types/plugins/inline-popup/config/items/img.d.ts +9 -0
- package/types/plugins/inline-popup/config/items/toolbar.d.ts +7 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +0 -36
- package/types/plugins/justify/justify.d.ts +0 -8
- package/types/plugins/key-arrow-outside/key-arrow-outside.d.ts +0 -8
- package/types/plugins/limit/config.d.ts +0 -9
- package/types/plugins/limit/limit.d.ts +2 -23
- package/types/plugins/line-height/config.d.ts +0 -9
- package/types/plugins/line-height/langs/index.d.ts +25 -0
- package/types/plugins/line-height/line-height.d.ts +0 -5
- package/types/plugins/link/config.d.ts +0 -33
- package/types/plugins/link/link.d.ts +0 -11
- package/types/plugins/link/template.d.ts +0 -3
- package/types/plugins/media/config.d.ts +0 -9
- package/types/plugins/media/media.d.ts +0 -8
- package/types/plugins/mobile/config.d.ts +0 -6
- package/types/plugins/mobile/mobile.d.ts +0 -8
- package/types/plugins/ordered-list/ordered-list.d.ts +0 -8
- package/types/plugins/paste/config.d.ts +0 -19
- package/types/plugins/paste/helpers.d.ts +0 -12
- package/types/plugins/paste/interface.d.ts +0 -3
- package/types/plugins/paste/paste.d.ts +0 -31
- package/types/plugins/paste-from-word/config.d.ts +0 -21
- package/types/plugins/paste-from-word/paste-from-word.d.ts +0 -11
- package/types/plugins/paste-storage/paste-storage.d.ts +0 -8
- package/types/plugins/placeholder/config.d.ts +0 -31
- package/types/plugins/placeholder/placeholder.d.ts +0 -11
- package/types/plugins/powered-by-jodit/powered-by-jodit.d.ts +0 -8
- package/types/plugins/preview/preview.d.ts +0 -5
- package/types/plugins/print/lib/generate-critical-css.d.ts +0 -6
- package/types/plugins/print/print.d.ts +0 -5
- package/types/plugins/redo-undo/redo-undo.d.ts +0 -9
- package/types/plugins/resize-cells/resize-cells.d.ts +0 -42
- package/types/plugins/resize-handler/resize-handler.d.ts +0 -26
- package/types/plugins/resizer/config.d.ts +0 -31
- package/types/plugins/resizer/resizer.d.ts +0 -22
- package/types/plugins/search/config.d.ts +0 -21
- package/types/plugins/search/helpers/index.d.ts +0 -3
- package/types/plugins/search/helpers/sentence-finder.d.ts +0 -3
- package/types/plugins/search/helpers/wrap-ranges-texts-in-tmp-span.d.ts +0 -3
- package/types/plugins/search/search.d.ts +0 -22
- package/types/plugins/search/ui/search.d.ts +0 -6
- package/types/plugins/select/config.d.ts +0 -8
- package/types/plugins/select/select.d.ts +0 -19
- package/types/plugins/select-cells/select-cells.d.ts +0 -34
- package/types/plugins/size/size.d.ts +0 -27
- package/types/plugins/source/config.d.ts +0 -25
- package/types/plugins/source/editor/engines/ace.d.ts +0 -6
- package/types/plugins/source/editor/engines/area.d.ts +0 -3
- package/types/plugins/source/editor/engines/index.d.ts +0 -3
- package/types/plugins/source/editor/factory.d.ts +0 -3
- package/types/plugins/source/editor/sourceEditor.d.ts +0 -6
- package/types/plugins/source/source.d.ts +0 -17
- package/types/plugins/speech-recognize/config.d.ts +19 -0
- package/types/plugins/speech-recognize/constants.d.ts +7 -0
- package/types/plugins/speech-recognize/helpers/api.d.ts +7 -0
- package/types/plugins/speech-recognize/helpers/exec-spell-command.d.ts +7 -0
- package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +45 -0
- package/types/plugins/speech-recognize/helpers/sound.d.ts +11 -0
- package/types/plugins/speech-recognize/interface.d.ts +30 -0
- package/types/plugins/speech-recognize/langs/index.d.ts +25 -0
- package/types/plugins/speech-recognize/speech-recognize.d.ts +19 -0
- package/types/plugins/spellcheck/config.d.ts +0 -4
- package/types/plugins/spellcheck/langs/index.d.ts +25 -0
- package/types/plugins/spellcheck/spellcheck.d.ts +0 -5
- package/types/plugins/stat/stat.d.ts +0 -5
- package/types/plugins/sticky/config.d.ts +0 -19
- package/types/plugins/sticky/sticky.d.ts +0 -18
- package/types/plugins/symbols/langs/index.d.ts +25 -0
- package/types/plugins/symbols/symbols.d.ts +0 -11
- package/types/plugins/tab/cases/index.d.ts +0 -3
- package/types/plugins/tab/cases/on-tab-inside-li.d.ts +0 -8
- package/types/plugins/tab/config.d.ts +0 -3
- package/types/plugins/table/table.d.ts +0 -5
- package/types/plugins/table-keyboard-navigation/table-keyboard-navigation.d.ts +0 -8
- package/types/plugins/wrap-nodes/config.d.ts +0 -3
- package/types/plugins/xpath/xpath.d.ts +0 -5
- package/types/polyfills.d.ts +10 -0
- package/types/styles/icons/index.d.ts +0 -5
- package/types/types/async.d.ts +9 -2
- package/types/types/core.d.ts +7 -1
- package/types/types/file-browser.d.ts +15 -0
- package/types/types/index.d.ts +1 -0
- package/types/types/jodit.d.ts +1 -1
- package/types/types/messages.d.ts +10 -0
- package/types/types/storage.d.ts +0 -3
- package/types/types/traits.d.ts +2 -2
- package/types/types/types.d.ts +2 -2
- package/types/types/uploader.d.ts +1 -1
- package/types/types/view.d.ts +3 -0
- package/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png +0 -0
- package/src/modules/image-editor/__image_snapshots__/image-editor-test-screenshot-js-image-editor-screenshot-testing-open-image-editor-works-1-snap.png +0 -0
- package/src/plugins/error-messages/README.md +0 -10
- package/src/plugins/error-messages/error-messages.ts +0 -109
- package/src/plugins/error-messages/errors-messages.less +0 -49
- package/types/plugins/error-messages/error-messages.d.ts +0 -29
|
@@ -0,0 +1,48 @@
|
|
|
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-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { HTMLTagNames, Nullable } from 'jodit/types';
|
|
7
|
+
export interface IVDomText {
|
|
8
|
+
readonly type: 'TEXT_ELEMENT';
|
|
9
|
+
readonly props: {
|
|
10
|
+
nodeValue: string;
|
|
11
|
+
children: [];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface IVDomElement {
|
|
15
|
+
readonly type: HTMLTagNames;
|
|
16
|
+
readonly props: {
|
|
17
|
+
children: IVDom[];
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare type IVDom = IVDomText | IVDomElement;
|
|
22
|
+
export interface IFiber {
|
|
23
|
+
effectTag?: 'PLACEMENT' | 'UPDATE' | 'DELETION';
|
|
24
|
+
parent?: IFiber;
|
|
25
|
+
sibling?: IFiber;
|
|
26
|
+
child?: IFiber;
|
|
27
|
+
alternate?: IFiber;
|
|
28
|
+
dom: Nullable<Node>;
|
|
29
|
+
type: IVDom['type'];
|
|
30
|
+
props: IVDom['props'];
|
|
31
|
+
}
|
|
32
|
+
export interface IRangeVDom {
|
|
33
|
+
start: IVDom;
|
|
34
|
+
startOffset: number;
|
|
35
|
+
end: IVDom;
|
|
36
|
+
endOffset: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IVDomManipulate {
|
|
39
|
+
patch(vdom: IVDom, action: (v: IVDom) => IVDom): IVDomManipulate;
|
|
40
|
+
remove(vdom: IVDom): IVDomManipulate;
|
|
41
|
+
append(vdom: IVDom, newVDom: IVDom): IVDomManipulate;
|
|
42
|
+
prepend(vdom: IVDom, newVDom: IVDom): IVDomManipulate;
|
|
43
|
+
select(vdom: IVDom, range: IRangeVDom): IVDomManipulate;
|
|
44
|
+
}
|
|
45
|
+
export interface IVDomRender {
|
|
46
|
+
htmlToVDom(html: string): IVDom;
|
|
47
|
+
render(vdom: IVDom, root: HTMLElement): void;
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IVDom } from '../interface';
|
|
7
|
+
export declare class VDomRender {
|
|
8
|
+
private async;
|
|
9
|
+
private commitRoot;
|
|
10
|
+
private commitWork;
|
|
11
|
+
private commitDeletion;
|
|
12
|
+
render(element: IVDom, container: Node): void;
|
|
13
|
+
private nextUnitOfWork;
|
|
14
|
+
private currentRoot;
|
|
15
|
+
private wipRoot;
|
|
16
|
+
private deletions;
|
|
17
|
+
private workLoop;
|
|
18
|
+
constructor();
|
|
19
|
+
private performUnitOfWork;
|
|
20
|
+
private __updateHostComponent;
|
|
21
|
+
private __reconcileChildren;
|
|
22
|
+
htmlToVDom(html: string): IVDom;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import './v-dom-jodit.less';
|
|
7
|
+
export declare class VDomJodit {
|
|
8
|
+
private container;
|
|
9
|
+
private vdom;
|
|
10
|
+
private render;
|
|
11
|
+
set value(v: string);
|
|
12
|
+
private constructor();
|
|
13
|
+
static make(elm: HTMLInputElement): VDomJodit;
|
|
14
|
+
private preventAllInputEvents;
|
|
15
|
+
}
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* @module view
|
|
8
|
-
*/
|
|
9
6
|
import './view-with-toolbar.less';
|
|
10
7
|
import type { IViewWithToolbar, IToolbarCollection, IDictionary, IPluginButton, IViewOptions } from 'jodit/types';
|
|
11
8
|
import { View } from './view';
|
|
@@ -13,35 +10,16 @@ export declare abstract class ViewWithToolbar extends View implements IViewWithT
|
|
|
13
10
|
TOOLBAR: IToolbarCollection;
|
|
14
11
|
readonly toolbar: this['TOOLBAR'];
|
|
15
12
|
private defaultToolbarContainer;
|
|
16
|
-
/**
|
|
17
|
-
* Container for toolbar
|
|
18
|
-
*/
|
|
19
13
|
get toolbarContainer(): HTMLElement;
|
|
20
|
-
/**
|
|
21
|
-
* Change panel container
|
|
22
|
-
*/
|
|
23
14
|
setPanel(element: HTMLElement | string): void;
|
|
24
|
-
/**
|
|
25
|
-
* Helper for append toolbar in its place
|
|
26
|
-
*/
|
|
27
15
|
protected buildToolbar(): void;
|
|
28
16
|
registeredButtons: Set<IPluginButton>;
|
|
29
17
|
private groupToButtons;
|
|
30
18
|
getRegisteredButtonGroups(): IDictionary<string[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Register button for group
|
|
33
|
-
*/
|
|
34
19
|
registerButton(btn: IPluginButton): this;
|
|
35
|
-
/**
|
|
36
|
-
* Remove button from group
|
|
37
|
-
*/
|
|
38
20
|
unregisterButton(btn: IPluginButton): this;
|
|
39
|
-
/**
|
|
40
|
-
* Prepare toolbar items and append buttons in groups
|
|
41
|
-
*/
|
|
42
21
|
private beforeToolbarBuild;
|
|
43
22
|
readonly isJodit: boolean;
|
|
44
|
-
/** @override **/
|
|
45
23
|
protected constructor(options?: Partial<IViewOptions>, isJodit?: boolean);
|
|
46
24
|
destruct(): void;
|
|
47
25
|
}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
* [[include:core/view/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module view
|
|
10
|
-
*/
|
|
11
|
-
import type { IComponent, ICreate, IProgressBar, IStorage, IViewBased, IViewOptions, Nullable, IDictionary, IEventEmitter } from 'jodit/types';
|
|
6
|
+
import type { IComponent, ICreate, IProgressBar, IStorage, IViewBased, IViewOptions, Nullable, IDictionary, IEventEmitter, IMessages } from 'jodit/types';
|
|
12
7
|
import { Component } from 'jodit/modules';
|
|
13
8
|
import { Elms, Mods } from 'jodit/core/traits';
|
|
14
9
|
export interface View extends Mods, Elms {
|
|
@@ -18,33 +13,14 @@ export declare abstract class View extends Component implements IViewBased, Mods
|
|
|
18
13
|
readonly isView: true;
|
|
19
14
|
parent: Nullable<IViewBased>;
|
|
20
15
|
readonly mods: IDictionary<string | boolean | null>;
|
|
21
|
-
/**
|
|
22
|
-
* ID attribute for source element, id add `{id}_editor` it's editor's id
|
|
23
|
-
*/
|
|
24
16
|
id: string;
|
|
25
|
-
/**
|
|
26
|
-
* All created ViewComponent inside this view
|
|
27
|
-
*/
|
|
28
17
|
readonly components: Set<IComponent>;
|
|
29
|
-
/**
|
|
30
|
-
* Get path for loading extra staff
|
|
31
|
-
*/
|
|
32
18
|
get basePath(): string;
|
|
33
19
|
readonly version: string;
|
|
34
20
|
static readonly esNext: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Return default timeout period in milliseconds for some debounce or throttle functions.
|
|
37
|
-
* By default, `{history.timeout}` options
|
|
38
|
-
*/
|
|
39
21
|
get defaultTimeout(): number;
|
|
40
|
-
/**
|
|
41
|
-
* Some extra data inside editor
|
|
42
|
-
* @see copyformat plugin
|
|
43
|
-
*/
|
|
44
22
|
readonly buffer: IStorage;
|
|
45
|
-
|
|
46
|
-
* Container for persistent set/get value
|
|
47
|
-
*/
|
|
23
|
+
readonly message: IMessages;
|
|
48
24
|
readonly storage: IStorage<import("jodit/types").StorageValueType>;
|
|
49
25
|
readonly create: ICreate;
|
|
50
26
|
get c(): this['create'];
|
|
@@ -53,70 +29,31 @@ export declare abstract class View extends Component implements IViewBased, Mods
|
|
|
53
29
|
set container(container: HTMLDivElement);
|
|
54
30
|
readonly events: IEventEmitter;
|
|
55
31
|
get e(): this['events'];
|
|
56
|
-
/**
|
|
57
|
-
* progress_bar Progress bar
|
|
58
|
-
*/
|
|
59
32
|
progressbar: IProgressBar;
|
|
60
33
|
OPTIONS: IViewOptions;
|
|
61
34
|
private __options;
|
|
62
35
|
get options(): this['OPTIONS'];
|
|
63
36
|
set options(options: this['OPTIONS']);
|
|
64
|
-
/**
|
|
65
|
-
* Short alias for options
|
|
66
|
-
*/
|
|
67
37
|
get o(): this['options'];
|
|
68
|
-
/**
|
|
69
|
-
* Internationalization method. Uses Jodit.lang object
|
|
70
|
-
*/
|
|
71
38
|
i18n(text: string, ...params: Array<string | number>): string;
|
|
72
39
|
private __isFullSize;
|
|
73
40
|
toggleFullSize(isFullSize?: boolean): void;
|
|
74
41
|
private __whoLocked;
|
|
75
|
-
/**
|
|
76
|
-
* View is locked
|
|
77
|
-
*/
|
|
78
42
|
get isLocked(): boolean;
|
|
79
43
|
isLockedNotBy: (name: string) => boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Disable selecting
|
|
82
|
-
*/
|
|
83
44
|
lock(name?: string): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Enable selecting
|
|
86
|
-
*/
|
|
87
45
|
unlock(): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* View is in fullSize
|
|
90
|
-
*/
|
|
91
46
|
get isFullSize(): boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Return current version
|
|
94
|
-
*/
|
|
95
47
|
getVersion(): string;
|
|
96
48
|
static getVersion(): string;
|
|
97
|
-
/** @override */
|
|
98
49
|
protected initOptions(options?: Partial<IViewOptions>): void;
|
|
99
|
-
/**
|
|
100
|
-
* Can change ownerWindow here
|
|
101
|
-
*/
|
|
102
50
|
protected initOwners(): void;
|
|
103
|
-
/**
|
|
104
|
-
* Add option's event handlers in emitter
|
|
105
|
-
*/
|
|
106
51
|
protected attachEvents(options?: IViewOptions): void;
|
|
107
52
|
protected constructor(options?: Partial<IViewOptions>, isJodit?: boolean);
|
|
108
53
|
private __modulesInstances;
|
|
109
|
-
/**
|
|
110
|
-
* Make one instance of one module
|
|
111
|
-
*/
|
|
112
54
|
getInstance<T extends IComponent>(moduleName: string, options?: object): T;
|
|
113
|
-
/** Add some element to box */
|
|
114
55
|
protected addDisclaimer(elm: HTMLElement): void;
|
|
115
|
-
/**
|
|
116
|
-
* Call before destruct
|
|
117
|
-
*/
|
|
118
56
|
protected beforeDestruct(): void;
|
|
119
|
-
/** @override */
|
|
120
57
|
destruct(): void;
|
|
121
58
|
static defaultOptions: IViewOptions;
|
|
122
59
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
* [[include:README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module jodit
|
|
10
|
-
*/
|
|
11
|
-
import './styles';
|
|
6
|
+
import './styles/index.less';
|
|
12
7
|
import { Jodit as DefaultJodit } from './jodit';
|
|
13
8
|
import 'jodit/plugins/index';
|
|
14
9
|
export { DefaultJodit as Jodit };
|
package/types/jodit.d.ts
CHANGED
|
@@ -3,367 +3,115 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module jodit
|
|
10
|
-
*/
|
|
11
6
|
import type { CustomCommand, IDictionary, IPluginSystem, IStatusBar, IWorkPlace, Modes, IFileBrowser, IJodit, IUploader, ICreate, IStorage, CanPromise, IHistory } from './types';
|
|
7
|
+
import type * as Modules from './modules/';
|
|
12
8
|
import { Config } from './config';
|
|
13
9
|
import * as constants from './core/constants';
|
|
14
|
-
import {
|
|
10
|
+
import { Select, ViewWithToolbar } from './modules/';
|
|
15
11
|
import { Dlgs } from 'jodit/core/traits';
|
|
16
|
-
/**
|
|
17
|
-
* Class Jodit. Main class
|
|
18
|
-
*/
|
|
19
12
|
export interface Jodit extends Dlgs {
|
|
20
13
|
}
|
|
21
14
|
export declare class Jodit extends ViewWithToolbar implements IJodit, Dlgs {
|
|
22
|
-
/** @override */
|
|
23
15
|
className(): string;
|
|
24
|
-
/**
|
|
25
|
-
* Return promise for ready actions
|
|
26
|
-
* @example
|
|
27
|
-
* ```js
|
|
28
|
-
* const jodit = Jodit.make('#editor');
|
|
29
|
-
* await jodit.waitForReady();
|
|
30
|
-
* jodit.e.fire('someAsyncLoadedPluginEvent', (test) => {
|
|
31
|
-
* alert(test);
|
|
32
|
-
* });
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
16
|
waitForReady(): Promise<IJodit>;
|
|
36
17
|
static get ready(): Promise<IJodit>;
|
|
37
|
-
/**
|
|
38
|
-
* Define if object is Jodit
|
|
39
|
-
*/
|
|
40
18
|
readonly isJodit: true;
|
|
41
|
-
/**
|
|
42
|
-
* Plain text editor's value
|
|
43
|
-
*/
|
|
44
19
|
get text(): string;
|
|
45
|
-
/**
|
|
46
|
-
* Return default timeout period in milliseconds for some debounce or throttle functions.
|
|
47
|
-
* By default, `{history.timeout}` options
|
|
48
|
-
*/
|
|
49
20
|
get defaultTimeout(): number;
|
|
50
|
-
/**
|
|
51
|
-
* Method wrap usual Has Object in Object helper for prevent deep object merging in options*
|
|
52
|
-
*/
|
|
53
21
|
static atom<T>(object: T): T;
|
|
54
|
-
/**
|
|
55
|
-
* Factory for creating Jodit instance
|
|
56
|
-
*/
|
|
57
22
|
static make(element: HTMLElement | string, options?: object): Jodit;
|
|
58
|
-
/**
|
|
59
|
-
* Checks if the element has already been initialized when for Jodit
|
|
60
|
-
*/
|
|
61
23
|
static isJoditAssigned(element: HTMLElement): element is HTMLElement & {
|
|
62
24
|
component: Jodit;
|
|
63
25
|
};
|
|
64
|
-
/**
|
|
65
|
-
* Default settings
|
|
66
|
-
*/
|
|
67
26
|
static get defaultOptions(): Config;
|
|
68
27
|
static fatMode: boolean;
|
|
69
28
|
static readonly plugins: IPluginSystem;
|
|
70
|
-
static
|
|
71
|
-
static
|
|
29
|
+
static modules: typeof Modules;
|
|
30
|
+
static ns: typeof Modules;
|
|
72
31
|
static readonly decorators: IDictionary<Function>;
|
|
73
32
|
static readonly constants: typeof constants;
|
|
74
33
|
static readonly instances: IDictionary<IJodit>;
|
|
75
34
|
static readonly lang: any;
|
|
76
35
|
static readonly core: {
|
|
77
|
-
Plugin: typeof Plugin;
|
|
36
|
+
Plugin: typeof Modules.Plugin;
|
|
78
37
|
};
|
|
79
38
|
private readonly commands;
|
|
80
39
|
private __selectionLocked;
|
|
81
40
|
private __wasReadOnly;
|
|
82
|
-
/**
|
|
83
|
-
* Container for set/get value
|
|
84
|
-
*/
|
|
85
41
|
readonly storage: IStorage;
|
|
86
42
|
readonly createInside: ICreate;
|
|
87
|
-
/**
|
|
88
|
-
* Editor has focus in this time
|
|
89
|
-
*/
|
|
90
43
|
editorIsActive: boolean;
|
|
91
44
|
private setPlaceField;
|
|
92
|
-
/**
|
|
93
|
-
* element It contains source element
|
|
94
|
-
*/
|
|
95
45
|
get element(): HTMLElement;
|
|
96
|
-
/**
|
|
97
|
-
* editor It contains the root element editor
|
|
98
|
-
*/
|
|
99
46
|
get editor(): HTMLDivElement | HTMLBodyElement;
|
|
100
47
|
set editor(editor: HTMLDivElement | HTMLBodyElement);
|
|
101
|
-
/**
|
|
102
|
-
* Container for all staff
|
|
103
|
-
*/
|
|
104
48
|
get container(): HTMLDivElement;
|
|
105
49
|
set container(container: HTMLDivElement);
|
|
106
|
-
/**
|
|
107
|
-
* workplace It contains source and wysiwyg editors
|
|
108
|
-
*/
|
|
109
50
|
get workplace(): HTMLDivElement;
|
|
110
|
-
/**
|
|
111
|
-
* Statusbar module
|
|
112
|
-
*/
|
|
113
51
|
get statusbar(): IStatusBar;
|
|
114
|
-
/**
|
|
115
|
-
* iframe Iframe for iframe mode
|
|
116
|
-
*/
|
|
117
52
|
get iframe(): HTMLIFrameElement | void;
|
|
118
53
|
set iframe(iframe: HTMLIFrameElement | void);
|
|
119
54
|
get history(): IHistory;
|
|
120
|
-
/**
|
|
121
|
-
* @deprecated Instead use `Jodit.history`
|
|
122
|
-
*/
|
|
123
55
|
get observer(): IHistory;
|
|
124
|
-
/**
|
|
125
|
-
* In iframe mode editor's window can be different by owner
|
|
126
|
-
*/
|
|
127
56
|
get editorWindow(): Window;
|
|
128
57
|
set editorWindow(win: Window);
|
|
129
|
-
/**
|
|
130
|
-
* Alias for this.ew
|
|
131
|
-
*/
|
|
132
58
|
get ew(): this['editorWindow'];
|
|
133
|
-
/**
|
|
134
|
-
* In iframe mode editor's window can be different by owner
|
|
135
|
-
*/
|
|
136
59
|
get editorDocument(): Document;
|
|
137
|
-
/**
|
|
138
|
-
* Alias for this.ew
|
|
139
|
-
*/
|
|
140
60
|
get ed(): this['editorDocument'];
|
|
141
|
-
/**
|
|
142
|
-
* options All Jodit settings default + second arguments of constructor
|
|
143
|
-
*/
|
|
144
61
|
get options(): Config;
|
|
145
62
|
set options(opt: Config);
|
|
146
63
|
readonly selection: Select;
|
|
147
|
-
/**
|
|
148
|
-
* Alias for this.selection
|
|
149
|
-
*/
|
|
150
64
|
get s(): this['selection'];
|
|
151
65
|
get uploader(): IUploader;
|
|
152
66
|
get filebrowser(): IFileBrowser;
|
|
153
67
|
private __mode;
|
|
154
|
-
/**
|
|
155
|
-
* Editor's mode
|
|
156
|
-
*/
|
|
157
68
|
get mode(): Modes;
|
|
158
69
|
set mode(mode: Modes);
|
|
159
|
-
/**
|
|
160
|
-
* Return real HTML value from WYSIWYG editor.
|
|
161
|
-
*/
|
|
162
70
|
getNativeEditorValue(): string;
|
|
163
|
-
/**
|
|
164
|
-
* Set value to native editor
|
|
165
|
-
*/
|
|
166
71
|
setNativeEditorValue(value: string): void;
|
|
167
|
-
/**
|
|
168
|
-
* HTML value
|
|
169
|
-
*/
|
|
170
72
|
get value(): string;
|
|
171
73
|
set value(html: string);
|
|
172
74
|
synchronizeValues(): void;
|
|
173
|
-
/**
|
|
174
|
-
* This is an internal method, do not use it in your applications.
|
|
175
|
-
* @private
|
|
176
|
-
*/
|
|
177
75
|
__imdSynchronizeValues(): void;
|
|
178
|
-
/**
|
|
179
|
-
* Return editor value
|
|
180
|
-
*/
|
|
181
76
|
getEditorValue(removeSelectionMarkers?: boolean, consumer?: string): string;
|
|
182
77
|
private __callChangeCount;
|
|
183
|
-
/**
|
|
184
|
-
* Set editor html value and if set sync fill source element value
|
|
185
|
-
* When method was called without arguments - it is simple way to synchronize editor to element
|
|
186
|
-
*/
|
|
187
78
|
setEditorValue(value?: string): void;
|
|
188
|
-
/**
|
|
189
|
-
* If some plugin changes the DOM directly, then you need to update the content of the original element
|
|
190
|
-
*/
|
|
191
79
|
protected updateElementValue(): void;
|
|
192
|
-
/**
|
|
193
|
-
* Return source element value
|
|
194
|
-
*/
|
|
195
80
|
getElementValue(): string;
|
|
196
|
-
/**
|
|
197
|
-
* @deprecated Use `Jodit.value` instead
|
|
198
|
-
*/
|
|
199
81
|
protected setElementValue(value?: string): CanPromise<void>;
|
|
200
82
|
private __setElementValue;
|
|
201
|
-
/**
|
|
202
|
-
* Register custom handler for command
|
|
203
|
-
*
|
|
204
|
-
* @example
|
|
205
|
-
* ```javascript
|
|
206
|
-
* var jodit = Jodit.make('#editor);
|
|
207
|
-
*
|
|
208
|
-
* jodit.setEditorValue('test test test');
|
|
209
|
-
*
|
|
210
|
-
* jodit.registerCommand('replaceString', function (command, needle, replace) {
|
|
211
|
-
* var value = this.getEditorValue();
|
|
212
|
-
* this.setEditorValue(value.replace(needle, replace));
|
|
213
|
-
* return false; // stop execute native command
|
|
214
|
-
* });
|
|
215
|
-
*
|
|
216
|
-
* jodit.execCommand('replaceString', 'test', 'stop');
|
|
217
|
-
*
|
|
218
|
-
* console.log(jodit.value); // stop test test
|
|
219
|
-
*
|
|
220
|
-
* // and you can add hotkeys for command
|
|
221
|
-
* jodit.registerCommand('replaceString', {
|
|
222
|
-
* hotkeys: 'ctrl+r',
|
|
223
|
-
* exec: function (command, needle, replace) {
|
|
224
|
-
* var value = this.getEditorValue();
|
|
225
|
-
* this.setEditorValue(value.replace(needle, replace));
|
|
226
|
-
* }
|
|
227
|
-
* });
|
|
228
|
-
*
|
|
229
|
-
* ```
|
|
230
|
-
*/
|
|
231
83
|
registerCommand(commandNameOriginal: string, command: CustomCommand<IJodit>, options?: {
|
|
232
84
|
stopPropagation: boolean;
|
|
233
85
|
}): IJodit;
|
|
234
|
-
/**
|
|
235
|
-
* Register hotkey for command
|
|
236
|
-
*/
|
|
237
86
|
registerHotkeyToCommand(hotkeys: string | string[], commandName: string, shouldStop?: boolean): void;
|
|
238
|
-
/**
|
|
239
|
-
* Execute command editor
|
|
240
|
-
*
|
|
241
|
-
* @param command - command. It supports all the
|
|
242
|
-
* @see https://developer.mozilla.org/ru/docs/Web/API/Document/execCommand#commands and a number of its own
|
|
243
|
-
* for example applyStyleProperty. Comand fontSize receives the second parameter px,
|
|
244
|
-
* formatBlock and can take several options
|
|
245
|
-
* @example
|
|
246
|
-
* ```javascript
|
|
247
|
-
* this.execCommand('fontSize', 12); // sets the size of 12 px
|
|
248
|
-
* this.execCommand('underline');
|
|
249
|
-
* this.execCommand('formatBlock', 'p'); // will be inserted paragraph
|
|
250
|
-
* ```
|
|
251
|
-
*/
|
|
252
87
|
execCommand(command: string, showUI?: boolean, value?: null | any): void;
|
|
253
|
-
/**
|
|
254
|
-
* Don't raise a change event
|
|
255
|
-
*/
|
|
256
88
|
private isSilentChange;
|
|
257
|
-
/**
|
|
258
|
-
* Exec native command
|
|
259
|
-
*/
|
|
260
89
|
nativeExecCommand(command: string, showUI?: boolean, value?: null | any): boolean;
|
|
261
90
|
private execCustomCommands;
|
|
262
|
-
/**
|
|
263
|
-
* Disable selecting
|
|
264
|
-
*/
|
|
265
91
|
lock(name?: string): boolean;
|
|
266
|
-
/**
|
|
267
|
-
* Enable selecting
|
|
268
|
-
*/
|
|
269
92
|
unlock(): boolean;
|
|
270
|
-
/**
|
|
271
|
-
* Return current editor mode: Jodit.MODE_WYSIWYG, Jodit.MODE_SOURCE or Jodit.MODE_SPLIT
|
|
272
|
-
*/
|
|
273
93
|
getMode(): Modes;
|
|
274
94
|
isEditorMode(): boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Return current real work mode. When editor in MODE_SOURCE or MODE_WYSIWYG it will
|
|
277
|
-
* return them, but then editor in MODE_SPLIT it will return MODE_SOURCE if
|
|
278
|
-
* Textarea(CodeMirror) focused or MODE_WYSIWYG otherwise
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```javascript
|
|
282
|
-
* var editor = Jodit.make('#editor');
|
|
283
|
-
* console.log(editor.getRealMode());
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
95
|
getRealMode(): Modes;
|
|
287
|
-
/**
|
|
288
|
-
* Set current mode
|
|
289
|
-
*/
|
|
290
96
|
setMode(mode: number | string): void;
|
|
291
|
-
/**
|
|
292
|
-
* Toggle editor mode WYSIWYG to TEXTAREA(CodeMirror) to SPLIT(WYSIWYG and TEXTAREA) to again WYSIWYG
|
|
293
|
-
*
|
|
294
|
-
* @example
|
|
295
|
-
* ```javascript
|
|
296
|
-
* var editor = Jodit.make('#editor');
|
|
297
|
-
* editor.toggleMode();
|
|
298
|
-
* ```
|
|
299
|
-
*/
|
|
300
97
|
toggleMode(): void;
|
|
301
|
-
/**
|
|
302
|
-
* Switch on/off the editor into the disabled state.
|
|
303
|
-
* When in disabled, the user is not able to change the editor content
|
|
304
|
-
* This function firing the `disabled` event.
|
|
305
|
-
*/
|
|
306
98
|
setDisabled(isDisabled: boolean): void;
|
|
307
|
-
/**
|
|
308
|
-
* Return true if editor in disabled mode
|
|
309
|
-
*/
|
|
310
99
|
getDisabled(): boolean;
|
|
311
|
-
/**
|
|
312
|
-
* Switch on/off the editor into the read-only state.
|
|
313
|
-
* When in readonly, the user is not able to change the editor content, but can still
|
|
314
|
-
* use some editor functions (show source code, print content, or seach).
|
|
315
|
-
* This function firing the `readonly` event.
|
|
316
|
-
*/
|
|
317
100
|
setReadOnly(isReadOnly: boolean): void;
|
|
318
|
-
/**
|
|
319
|
-
* Return true if editor in read-only mode
|
|
320
|
-
*/
|
|
321
101
|
getReadOnly(): boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Hook before init
|
|
324
|
-
*/
|
|
325
102
|
beforeInitHook(): CanPromise<void>;
|
|
326
|
-
/**
|
|
327
|
-
* Hook after init
|
|
328
|
-
*/
|
|
329
103
|
afterInitHook(): void;
|
|
330
|
-
/** @override **/
|
|
331
104
|
protected initOptions(options?: object): void;
|
|
332
|
-
/** @override **/
|
|
333
105
|
protected initOwners(): void;
|
|
334
|
-
/**
|
|
335
|
-
* Create instance of Jodit
|
|
336
|
-
*
|
|
337
|
-
* @param element - Selector or HTMLElement
|
|
338
|
-
* @param options - Editor's options
|
|
339
|
-
*
|
|
340
|
-
* @deprecated - Instead use `Jodit.make`
|
|
341
|
-
*/
|
|
342
106
|
constructor(element: HTMLElement | string, options?: object);
|
|
343
107
|
currentPlace: IWorkPlace;
|
|
344
108
|
places: IWorkPlace[];
|
|
345
109
|
private readonly elementToPlace;
|
|
346
|
-
/**
|
|
347
|
-
* Create and init current editable place
|
|
348
|
-
*/
|
|
349
110
|
addPlace(source: HTMLElement | string, options?: object): void | Promise<any>;
|
|
350
|
-
/** @override */
|
|
351
111
|
protected addDisclaimer(elm: HTMLElement): void;
|
|
352
|
-
/**
|
|
353
|
-
* Set current place object
|
|
354
|
-
*/
|
|
355
112
|
setCurrentPlace(place: IWorkPlace): void;
|
|
356
113
|
private initEditor;
|
|
357
|
-
/**
|
|
358
|
-
* Create main DIV element and replace source textarea
|
|
359
|
-
*/
|
|
360
114
|
private createEditor;
|
|
361
|
-
/**
|
|
362
|
-
* Attach some native event listeners
|
|
363
|
-
*/
|
|
364
115
|
private prepareWYSIWYGEditor;
|
|
365
|
-
/**
|
|
366
|
-
* Jodit's Destructor. Remove editor, and return source input
|
|
367
|
-
*/
|
|
368
116
|
destruct(): void;
|
|
369
117
|
}
|
package/types/langs/index.d.ts
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:langs/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module langs
|
|
10
|
-
*/
|
|
11
6
|
import type { IDictionary } from 'jodit/types';
|
|
12
7
|
declare let exp: IDictionary<IDictionary<string>>;
|
|
13
8
|
export default exp;
|
|
@@ -3,30 +3,10 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* [[include:modules/context-menu/README.md]]
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @module modules/context-menu
|
|
10
|
-
*/
|
|
11
6
|
import './context-menu.less';
|
|
12
7
|
import type { IContextMenu, IContextMenuAction } from 'jodit/types';
|
|
13
8
|
import { Popup } from 'jodit/core/ui/popup';
|
|
14
|
-
/**
|
|
15
|
-
* Module to generate context menu
|
|
16
|
-
*/
|
|
17
9
|
export declare class ContextMenu extends Popup implements IContextMenu {
|
|
18
|
-
/** @override */
|
|
19
10
|
className(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Generate and show context menu
|
|
22
|
-
*
|
|
23
|
-
* @param x - Global coordinate by X
|
|
24
|
-
* @param y - Global coordinate by Y
|
|
25
|
-
* @param actions - Array with plain objects `{icon: 'bin', title: 'Delete', exec: function () {}}`
|
|
26
|
-
* @example
|
|
27
|
-
* ```javascript
|
|
28
|
-
* parent.show(e.clientX, e.clientY, [{icon: 'bin', title: 'Delete', exec: function () { alert(1) }]);
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
11
|
show(x: number, y: number, actions: Array<false | IContextMenuAction>): void;
|
|
32
12
|
}
|