jodit 4.0.0-beta.41 → 4.0.0-beta.48
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/CHANGELOG.md +12 -6
- package/README.md +54 -12
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.js +5592 -5068
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +8 -8
- package/es2015/plugins/debug/debug.min.js +2 -2
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +785 -749
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +4896 -0
- package/es2018/jodit.js +38892 -0
- package/es2018/jodit.min.css +1 -0
- package/es2018/jodit.min.js +10 -0
- package/es2018/plugins/debug/debug.js +97 -0
- package/es2018/plugins/debug/debug.min.js +10 -0
- package/es2018/plugins/speech-recognize/speech-recognize.css +42 -0
- package/es2018/plugins/speech-recognize/speech-recognize.js +1043 -0
- package/es2018/plugins/speech-recognize/speech-recognize.min.css +1 -0
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +10 -0
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.js +5590 -5066
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +8 -8
- package/es2021/plugins/debug/debug.min.js +2 -2
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +773 -737
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.js +5191 -4747
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +8 -8
- package/es2021.en/plugins/debug/debug.min.js +2 -2
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +34 -18
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.js +7386 -1682
- package/es5/jodit.min.css +1 -1
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +10 -10
- package/es5/plugins/debug/debug.min.js +2 -2
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +791 -755
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/config.js +2 -1
- package/esm/core/constants.js +2 -1
- package/esm/core/view/view.js +2 -1
- package/esm/index.js +0 -5
- package/esm/langs/index.js +20 -20
- package/esm/plugins/copy-format/langs/index.js +0 -25
- package/esm/plugins/index.js +0 -44
- package/esm/plugins/line-height/langs/index.js +0 -25
- package/esm/plugins/preview/preview.js +1 -1
- package/esm/plugins/spellcheck/langs/index.js +0 -25
- package/esm/plugins/symbols/langs/index.js +0 -25
- package/package.json +3 -6
- package/types/config.d.ts +560 -1
- package/types/core/async/async.d.ts +32 -0
- package/types/core/async/index.d.ts +3 -0
- package/types/core/component/component.d.ts +81 -0
- package/types/core/component/index.d.ts +3 -0
- package/types/core/component/statuses.d.ts +3 -0
- package/types/core/component/view-component.d.ts +13 -0
- package/types/core/constants.d.ts +62 -1
- package/types/core/create/create.d.ts +32 -0
- package/types/core/create/index.d.ts +3 -0
- package/types/core/decorators/cache/cache.d.ts +5 -0
- package/types/core/decorators/component/component.d.ts +9 -0
- package/types/core/decorators/debounce/debounce.d.ts +8 -0
- package/types/core/decorators/hook/hook.d.ts +8 -0
- package/types/core/decorators/idle/idle.d.ts +5 -0
- package/types/core/decorators/index.d.ts +5 -0
- package/types/core/decorators/nonenumerable/nonenumerable.d.ts +5 -0
- package/types/core/decorators/persistent/persistent.d.ts +5 -0
- package/types/core/decorators/wait/wait.d.ts +5 -0
- package/types/core/decorators/watch/watch.d.ts +8 -0
- package/types/core/dom/dom.d.ts +180 -0
- package/types/core/dom/index.d.ts +3 -0
- package/types/core/dom/lazy-walker.d.ts +3 -0
- package/types/core/event-emitter/event-emitter.d.ts +99 -0
- package/types/core/event-emitter/eventify.d.ts +25 -0
- package/types/core/event-emitter/index.d.ts +3 -0
- package/types/core/event-emitter/observable.d.ts +38 -0
- package/types/core/event-emitter/store.d.ts +3 -0
- package/types/core/global.d.ts +12 -0
- package/types/core/helpers/array/as-array.d.ts +3 -0
- package/types/core/helpers/array/index.d.ts +3 -0
- package/types/core/helpers/array/split-array.d.ts +6 -0
- package/types/core/helpers/array/to-array.d.ts +4 -0
- package/types/core/helpers/async/index.d.ts +3 -0
- package/types/core/helpers/async/set-timeout.d.ts +9 -0
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +6 -0
- package/types/core/helpers/checker/index.d.ts +3 -0
- package/types/core/helpers/checker/is-array.d.ts +6 -0
- package/types/core/helpers/checker/is-boolean.d.ts +3 -0
- package/types/core/helpers/checker/is-equal.d.ts +3 -0
- package/types/core/helpers/checker/is-function.d.ts +6 -0
- package/types/core/helpers/checker/is-html-from-word.d.ts +6 -0
- package/types/core/helpers/checker/is-html.d.ts +3 -0
- package/types/core/helpers/checker/is-imp-interface.d.ts +12 -0
- package/types/core/helpers/checker/is-int.d.ts +3 -0
- package/types/core/helpers/checker/is-jodit-object.d.ts +6 -0
- package/types/core/helpers/checker/is-marker.d.ts +3 -0
- package/types/core/helpers/checker/is-native-function.d.ts +6 -0
- package/types/core/helpers/checker/is-number.d.ts +6 -0
- package/types/core/helpers/checker/is-numeric.d.ts +3 -0
- package/types/core/helpers/checker/is-plain-object.d.ts +6 -0
- package/types/core/helpers/checker/is-promise.d.ts +3 -0
- package/types/core/helpers/checker/is-set.d.ts +3 -0
- package/types/core/helpers/checker/is-string.d.ts +6 -0
- package/types/core/helpers/checker/is-url.d.ts +6 -0
- package/types/core/helpers/checker/is-valid-name.d.ts +6 -0
- package/types/core/helpers/checker/is-view-object.d.ts +6 -0
- package/types/core/helpers/checker/is-void.d.ts +6 -0
- package/types/core/helpers/checker/is-window.d.ts +3 -0
- package/types/core/helpers/color/color-to-hex.d.ts +16 -0
- package/types/core/helpers/color/index.d.ts +3 -0
- package/types/core/helpers/html/apply-styles.d.ts +5 -0
- package/types/core/helpers/html/clean-from-word.d.ts +4 -0
- package/types/core/helpers/html/htmlspecialchars.d.ts +7 -0
- package/types/core/helpers/html/index.d.ts +3 -0
- package/types/core/helpers/html/nl2br.d.ts +6 -0
- package/types/core/helpers/html/safe-html.d.ts +3 -0
- package/types/core/helpers/html/strip-tags.d.ts +6 -0
- package/types/core/helpers/index.d.ts +5 -0
- package/types/core/helpers/normalize/index.d.ts +3 -0
- package/types/core/helpers/normalize/normalize-color.d.ts +6 -0
- package/types/core/helpers/normalize/normalize-key-aliases.d.ts +3 -0
- package/types/core/helpers/normalize/normalize-license.d.ts +3 -0
- package/types/core/helpers/normalize/normalize-path.d.ts +3 -0
- package/types/core/helpers/normalize/normalize-relative-path.d.ts +3 -0
- package/types/core/helpers/normalize/normalize-size.d.ts +6 -0
- package/types/core/helpers/normalize/normalize-url.d.ts +3 -0
- package/types/core/helpers/size/get-content-width.d.ts +3 -0
- package/types/core/helpers/size/get-scroll-parent.d.ts +3 -0
- package/types/core/helpers/size/index.d.ts +3 -0
- package/types/core/helpers/size/inner-width.d.ts +3 -0
- package/types/core/helpers/size/object-size.d.ts +3 -0
- package/types/core/helpers/size/offset.d.ts +7 -0
- package/types/core/helpers/size/position.d.ts +3 -0
- package/types/core/helpers/string/camel-case.d.ts +6 -0
- package/types/core/helpers/string/fuzzy-search-index.d.ts +4 -0
- package/types/core/helpers/string/i18n.d.ts +31 -0
- package/types/core/helpers/string/index.d.ts +3 -0
- package/types/core/helpers/string/kebab-case.d.ts +3 -0
- package/types/core/helpers/string/stringify.d.ts +3 -0
- package/types/core/helpers/string/trim.d.ts +7 -0
- package/types/core/helpers/string/ucfirst.d.ts +6 -0
- package/types/core/helpers/utils/align.d.ts +12 -0
- package/types/core/helpers/utils/append-script.d.ts +12 -0
- package/types/core/helpers/utils/assert.d.ts +1 -0
- package/types/core/helpers/utils/attr.d.ts +12 -0
- package/types/core/helpers/utils/browser.d.ts +14 -0
- package/types/core/helpers/utils/build-query.d.ts +6 -0
- package/types/core/helpers/utils/complete-url.d.ts +3 -0
- package/types/core/helpers/utils/config-proto.d.ts +33 -0
- package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +3 -0
- package/types/core/helpers/utils/css.d.ts +6 -0
- package/types/core/helpers/utils/ctrl-key.d.ts +7 -0
- package/types/core/helpers/utils/data-bind.d.ts +3 -0
- package/types/core/helpers/utils/default-language.d.ts +3 -0
- package/types/core/helpers/utils/error/error.d.ts +3 -0
- package/types/core/helpers/utils/error/errors/abort-error.d.ts +3 -0
- package/types/core/helpers/utils/error/errors/connection-error.d.ts +3 -0
- package/types/core/helpers/utils/error/errors/index.d.ts +3 -0
- package/types/core/helpers/utils/error/errors/options-error.d.ts +3 -0
- package/types/core/helpers/utils/error/index.d.ts +3 -0
- package/types/core/helpers/utils/get-class-name.d.ts +3 -0
- package/types/core/helpers/utils/get.d.ts +22 -0
- package/types/core/helpers/utils/human-size-to-bytes.d.ts +7 -0
- package/types/core/helpers/utils/index.d.ts +3 -0
- package/types/core/helpers/utils/mark-deprecated.d.ts +10 -0
- package/types/core/helpers/utils/parse-query.d.ts +6 -0
- package/types/core/helpers/utils/print.d.ts +9 -0
- package/types/core/helpers/utils/reset.d.ts +10 -0
- package/types/core/helpers/utils/scroll-into-view.d.ts +6 -0
- package/types/core/helpers/utils/selector.d.ts +29 -0
- package/types/core/helpers/utils/set.d.ts +16 -0
- package/types/core/helpers/utils/stack.d.ts +3 -0
- package/types/core/helpers/utils/utils.d.ts +24 -0
- package/types/core/helpers/utils/val.d.ts +3 -0
- package/types/core/plugin/helpers/init-instance.d.ts +11 -0
- package/types/core/plugin/helpers/load.d.ts +9 -0
- package/types/core/plugin/helpers/make-instance.d.ts +7 -0
- package/types/core/plugin/helpers/utils.d.ts +3 -0
- package/types/core/plugin/index.d.ts +3 -0
- package/types/core/plugin/interface.d.ts +4 -0
- package/types/core/plugin/plugin-system.d.ts +30 -0
- package/types/core/plugin/plugin.d.ts +10 -0
- package/types/core/request/ajax.d.ts +5 -0
- package/types/core/request/config.d.ts +6 -0
- package/types/core/request/index.d.ts +3 -0
- package/types/core/request/response.d.ts +3 -0
- package/types/core/selection/helpers/index.d.ts +3 -0
- package/types/core/selection/helpers/move-node-inside-start.d.ts +8 -0
- package/types/core/selection/helpers/move-the-node-along-the-edge-outward.d.ts +4 -0
- package/types/core/selection/index.d.ts +3 -0
- package/types/core/selection/interface.d.ts +9 -0
- package/types/core/selection/selection.d.ts +196 -0
- package/types/core/selection/style/api/extract.d.ts +16 -0
- package/types/core/selection/style/api/finite-state-machine.d.ts +3 -0
- package/types/core/selection/style/api/get-suit-child.d.ts +8 -0
- package/types/core/selection/style/api/get-suit-parent.d.ts +8 -0
- package/types/core/selection/style/api/has-same-style.d.ts +7 -0
- package/types/core/selection/style/api/is-inside-invisible-element.d.ts +4 -0
- package/types/core/selection/style/api/is-normal-node.d.ts +4 -0
- package/types/core/selection/style/api/is-same-attributes.d.ts +4 -0
- package/types/core/selection/style/api/is-suit-element.d.ts +24 -0
- package/types/core/selection/style/api/list/toggle-ordered-list.d.ts +4 -0
- package/types/core/selection/style/api/list/wrap-list.d.ts +5 -0
- package/types/core/selection/style/api/toggle-attributes.d.ts +4 -0
- package/types/core/selection/style/api/unwrap-children.d.ts +4 -0
- package/types/core/selection/style/api/wrap-unwrapped-text.d.ts +4 -0
- package/types/core/selection/style/api/wrap.d.ts +4 -0
- package/types/core/selection/style/apply-style.d.ts +4 -0
- package/types/core/selection/style/commit-style.d.ts +9 -0
- package/types/core/storage/engines/local-storage-provider.d.ts +9 -0
- package/types/core/storage/engines/memory-storage-provider.d.ts +3 -0
- package/types/core/storage/index.d.ts +3 -0
- package/types/core/storage/storage.d.ts +5 -0
- package/types/core/traits/dlgs.d.ts +3 -0
- package/types/core/traits/elms.d.ts +9 -0
- package/types/core/traits/mods.d.ts +11 -0
- package/types/core/ui/button/button/button.d.ts +35 -0
- package/types/core/ui/button/group/group.d.ts +6 -0
- package/types/core/ui/button/index.d.ts +5 -0
- package/types/core/ui/button/tooltip/tooltip.d.ts +5 -0
- package/types/core/ui/element.d.ts +27 -0
- package/types/core/ui/form/block/block.d.ts +4 -0
- package/types/core/ui/form/form.d.ts +7 -0
- package/types/core/ui/form/index.d.ts +3 -0
- package/types/core/ui/form/inputs/area/area.d.ts +6 -0
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +8 -0
- package/types/core/ui/form/inputs/file/file.d.ts +4 -0
- package/types/core/ui/form/inputs/index.d.ts +3 -0
- package/types/core/ui/form/inputs/input/input.d.ts +18 -0
- package/types/core/ui/form/inputs/select/select.d.ts +10 -0
- package/types/core/ui/form/validators/index.d.ts +3 -0
- package/types/core/ui/form/validators/input.d.ts +9 -0
- package/types/core/ui/form/validators/select.d.ts +6 -0
- package/types/core/ui/group/group.d.ts +32 -0
- package/types/core/ui/group/index.d.ts +3 -0
- package/types/core/ui/group/list.d.ts +16 -0
- package/types/core/ui/group/separator.d.ts +3 -0
- package/types/core/ui/group/spacer.d.ts +3 -0
- package/types/core/ui/helpers/buttons.d.ts +9 -0
- package/types/core/ui/helpers/get-control-type.d.ts +10 -0
- package/types/core/ui/helpers/get-strong-control-types.d.ts +6 -0
- package/types/core/ui/icon.d.ts +15 -0
- package/types/core/ui/index.d.ts +5 -0
- package/types/core/ui/popup/index.d.ts +3 -0
- package/types/core/ui/popup/popup.d.ts +35 -0
- package/types/core/ui/progress-bar/progress-bar.d.ts +10 -0
- package/types/core/view/view-with-toolbar.d.ts +22 -0
- package/types/core/view/view.d.ts +66 -1
- package/types/index.d.ts +5 -0
- package/types/jodit.d.ts +248 -0
- package/types/langs/index.d.ts +5 -0
- package/types/modules/context-menu/context-menu.d.ts +20 -0
- package/types/modules/dialog/alert.d.ts +17 -0
- package/types/modules/dialog/confirm.d.ts +17 -0
- package/types/modules/dialog/dialog.d.ts +115 -0
- package/types/modules/dialog/index.d.ts +5 -0
- package/types/modules/dialog/prompt.d.ts +20 -0
- package/types/modules/file-browser/builders/context-menu.d.ts +3 -0
- package/types/modules/file-browser/builders/elements-map.d.ts +7 -0
- package/types/modules/file-browser/builders/item.d.ts +3 -0
- package/types/modules/file-browser/data-provider.d.ts +72 -0
- package/types/modules/file-browser/factories.d.ts +3 -0
- package/types/modules/file-browser/fetch/delete-file.d.ts +7 -0
- package/types/modules/file-browser/fetch/load-items.d.ts +7 -0
- package/types/modules/file-browser/fetch/load-tree.d.ts +7 -0
- package/types/modules/file-browser/file-browser.d.ts +39 -0
- package/types/modules/file-browser/index.d.ts +5 -0
- package/types/modules/file-browser/listeners/native-listeners.d.ts +12 -0
- package/types/modules/file-browser/listeners/self-listeners.d.ts +6 -0
- package/types/modules/file-browser/listeners/state-listeners.d.ts +7 -0
- package/types/modules/file-browser/ui/index.d.ts +3 -0
- package/types/modules/history/command.d.ts +3 -0
- package/types/modules/history/history.d.ts +37 -0
- package/types/modules/history/snapshot.d.ts +40 -0
- package/types/modules/history/stack.d.ts +3 -0
- package/types/modules/image-editor/image-editor.d.ts +54 -1
- package/types/modules/image-editor/templates/form.d.ts +3 -0
- package/types/modules/index.d.ts +5 -0
- package/types/modules/messages/message.d.ts +3 -0
- package/types/modules/messages/messages.d.ts +8 -0
- package/types/modules/status-bar/status-bar.d.ts +20 -0
- package/types/modules/table/table.d.ts +57 -0
- package/types/modules/toolbar/button/button.d.ts +34 -1
- package/types/modules/toolbar/button/content.d.ts +6 -0
- package/types/modules/toolbar/button/index.d.ts +3 -0
- package/types/modules/toolbar/collection/collection.d.ts +23 -0
- package/types/modules/toolbar/collection/editor-collection.d.ts +19 -0
- package/types/modules/toolbar/factory.d.ts +11 -0
- package/types/modules/uploader/config.d.ts +6 -0
- package/types/modules/uploader/helpers/build-data.d.ts +3 -0
- package/types/modules/uploader/helpers/data-uri-to-blob.d.ts +6 -0
- package/types/modules/uploader/helpers/index.d.ts +3 -0
- package/types/modules/uploader/helpers/process-old-browser-drag.d.ts +3 -0
- package/types/modules/uploader/helpers/send-files.d.ts +6 -0
- package/types/modules/uploader/helpers/send.d.ts +3 -0
- package/types/modules/uploader/uploader.d.ts +35 -0
- package/types/modules/widget/color-picker/color-picker.d.ts +22 -0
- package/types/modules/widget/file-selector/file-selector.d.ts +41 -0
- package/types/modules/widget/index.d.ts +5 -0
- package/types/modules/widget/tabs/tabs.d.ts +22 -0
- package/types/plugins/about/about.d.ts +5 -0
- package/types/plugins/add-new-line/add-new-line.d.ts +9 -0
- package/types/plugins/add-new-line/config.d.ts +22 -0
- package/types/plugins/backspace/backspace.d.ts +11 -0
- package/types/plugins/backspace/cases/check-join-neighbors.d.ts +7 -0
- package/types/plugins/backspace/cases/check-join-two-lists.d.ts +16 -0
- package/types/plugins/backspace/cases/check-not-collapsed.d.ts +16 -0
- package/types/plugins/backspace/cases/check-remove-char.d.ts +16 -0
- package/types/plugins/backspace/cases/check-remove-content-not-editable.d.ts +7 -0
- package/types/plugins/backspace/cases/check-remove-empty-neighbor.d.ts +16 -0
- package/types/plugins/backspace/cases/check-remove-empty-parent.d.ts +17 -0
- package/types/plugins/backspace/cases/check-remove-unbreakable-element.d.ts +17 -0
- package/types/plugins/backspace/cases/check-table-cell.d.ts +17 -0
- package/types/plugins/backspace/cases/check-unwrap-first-list-item.d.ts +17 -0
- package/types/plugins/backspace/cases/index.d.ts +3 -0
- package/types/plugins/backspace/helpers.d.ts +11 -0
- package/types/plugins/backspace/interface.d.ts +27 -0
- package/types/plugins/bold/bold.d.ts +8 -0
- package/types/plugins/bold/interface.d.ts +18 -0
- package/types/plugins/class-span/class-span.d.ts +27 -0
- package/types/plugins/clean-html/clean-html.d.ts +17 -0
- package/types/plugins/clean-html/config.d.ts +73 -0
- package/types/plugins/clean-html/helpers/get-hash.d.ts +6 -0
- package/types/plugins/clean-html/helpers/index.d.ts +3 -0
- package/types/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.d.ts +11 -0
- package/types/plugins/clean-html/helpers/remove-format/remove-format-for-selection.d.ts +7 -0
- package/types/plugins/clean-html/helpers/visitor/filters/allow-attributes.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/remove-empty-text-node.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/remove-inv-text-nodes.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/replace-old-tags.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/sanitize-attributes.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/filters/try-remove-node.d.ts +6 -0
- package/types/plugins/clean-html/helpers/visitor/visit-node-walker.d.ts +6 -0
- package/types/plugins/clipboard/clipboard.d.ts +10 -0
- package/types/plugins/color/color.d.ts +8 -0
- package/types/plugins/copy-format/copy-format.d.ts +5 -0
- package/types/plugins/debug/debug.d.ts +5 -0
- package/types/plugins/delete/delete.d.ts +14 -0
- package/types/plugins/delete/interface.d.ts +3 -0
- package/types/plugins/drag-and-drop/drag-and-drop.d.ts +5 -0
- package/types/plugins/drag-and-drop-element/config.d.ts +3 -0
- package/types/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +26 -0
- package/types/plugins/dtd/after-insert/index.d.ts +4 -0
- package/types/plugins/dtd/after-insert/remove-extra-br.d.ts +9 -0
- package/types/plugins/dtd/before-insert/check-block-nesting.d.ts +9 -0
- package/types/plugins/dtd/before-insert/index.d.ts +4 -0
- package/types/plugins/dtd/config.d.ts +12 -0
- package/types/plugins/enter/enter.d.ts +11 -0
- package/types/plugins/enter/helpers/check-br.d.ts +7 -0
- package/types/plugins/enter/helpers/check-unsplittable-box.d.ts +7 -0
- package/types/plugins/enter/helpers/get-block-wrapper.d.ts +7 -0
- package/types/plugins/enter/helpers/has-previous-block.d.ts +6 -0
- package/types/plugins/enter/helpers/index.d.ts +3 -0
- package/types/plugins/enter/helpers/insert-paragraph.d.ts +7 -0
- package/types/plugins/enter/helpers/move-cursor-out-from-specal-tags.d.ts +7 -0
- package/types/plugins/enter/helpers/process-empty-li-leaf.d.ts +7 -0
- package/types/plugins/enter/helpers/split-fragment.d.ts +8 -0
- package/types/plugins/enter/helpers/wrap-text.d.ts +8 -0
- package/types/plugins/enter/interface.d.ts +20 -0
- package/types/plugins/file/file.d.ts +5 -0
- package/types/plugins/focus/focus.d.ts +5 -0
- package/types/plugins/font/font.d.ts +8 -0
- package/types/plugins/format-block/format-block.d.ts +8 -0
- package/types/plugins/fullsize/config.d.ts +22 -0
- package/types/plugins/fullsize/fullsize.d.ts +8 -0
- package/types/plugins/hotkeys/config.d.ts +3 -0
- package/types/plugins/hotkeys/hotkeys.d.ts +10 -0
- package/types/plugins/hr/hr.d.ts +5 -0
- package/types/plugins/iframe/config.d.ts +49 -0
- package/types/plugins/iframe/iframe.d.ts +9 -0
- package/types/plugins/image/image.d.ts +5 -0
- package/types/plugins/image-processor/config.d.ts +3 -0
- package/types/plugins/image-processor/image-processor.d.ts +8 -0
- package/types/plugins/image-properties/config.d.ts +60 -0
- package/types/plugins/image-properties/image-properties.d.ts +42 -0
- package/types/plugins/image-properties/templates/form.d.ts +3 -0
- package/types/plugins/image-properties/templates/main-tab.d.ts +3 -0
- package/types/plugins/image-properties/templates/position-tab.d.ts +3 -0
- package/types/plugins/indent/config.d.ts +3 -0
- package/types/plugins/indent/helpers.d.ts +4 -0
- package/types/plugins/indent/indent.d.ts +8 -0
- package/types/plugins/index.d.ts +5 -0
- package/types/plugins/inline-popup/config/config.d.ts +3 -0
- package/types/plugins/inline-popup/config/items/a.d.ts +3 -0
- package/types/plugins/inline-popup/config/items/cells.d.ts +3 -0
- package/types/plugins/inline-popup/config/items/iframe.d.ts +3 -0
- package/types/plugins/inline-popup/config/items/img.d.ts +3 -0
- package/types/plugins/inline-popup/config/items/toolbar.d.ts +3 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +36 -0
- package/types/plugins/justify/justify.d.ts +8 -0
- package/types/plugins/key-arrow-outside/key-arrow-outside.d.ts +8 -0
- package/types/plugins/limit/config.d.ts +9 -0
- package/types/plugins/limit/limit.d.ts +22 -0
- package/types/plugins/line-height/config.d.ts +9 -0
- package/types/plugins/line-height/line-height.d.ts +5 -0
- package/types/plugins/link/config.d.ts +33 -0
- package/types/plugins/link/link.d.ts +11 -0
- package/types/plugins/link/template.d.ts +3 -0
- package/types/plugins/media/config.d.ts +9 -0
- package/types/plugins/media/media.d.ts +8 -0
- package/types/plugins/mobile/config.d.ts +6 -0
- package/types/plugins/mobile/mobile.d.ts +8 -0
- package/types/plugins/ordered-list/ordered-list.d.ts +8 -0
- package/types/plugins/paste/config.d.ts +19 -0
- package/types/plugins/paste/helpers.d.ts +15 -0
- package/types/plugins/paste/interface.d.ts +15 -0
- package/types/plugins/paste/paste.d.ts +31 -0
- package/types/plugins/paste-from-word/config.d.ts +21 -0
- package/types/plugins/paste-from-word/paste-from-word.d.ts +11 -0
- package/types/plugins/paste-storage/paste-storage.d.ts +8 -0
- package/types/plugins/placeholder/config.d.ts +31 -0
- package/types/plugins/placeholder/placeholder.d.ts +12 -0
- package/types/plugins/powered-by-jodit/powered-by-jodit.d.ts +8 -0
- package/types/plugins/preview/preview.d.ts +5 -0
- package/types/plugins/print/lib/generate-critical-css.d.ts +6 -0
- package/types/plugins/print/print.d.ts +5 -0
- package/types/plugins/redo-undo/redo-undo.d.ts +9 -0
- package/types/plugins/resize-cells/resize-cells.d.ts +42 -0
- package/types/plugins/resize-handler/resize-handler.d.ts +26 -0
- package/types/plugins/resizer/config.d.ts +31 -0
- package/types/plugins/resizer/resizer.d.ts +22 -0
- package/types/plugins/search/config.d.ts +21 -0
- package/types/plugins/search/helpers/index.d.ts +3 -0
- package/types/plugins/search/helpers/sentence-finder.d.ts +3 -0
- package/types/plugins/search/helpers/wrap-ranges-texts-in-tmp-span.d.ts +18 -0
- package/types/plugins/search/interface.d.ts +23 -0
- package/types/plugins/search/search.d.ts +22 -0
- package/types/plugins/search/ui/search.d.ts +6 -0
- package/types/plugins/select/config.d.ts +8 -0
- package/types/plugins/select/select.d.ts +19 -0
- package/types/plugins/select-cells/select-cells.d.ts +34 -0
- package/types/plugins/size/size.d.ts +27 -0
- package/types/plugins/source/config.d.ts +25 -0
- package/types/plugins/source/editor/engines/ace.d.ts +6 -0
- package/types/plugins/source/editor/engines/area.d.ts +3 -0
- package/types/plugins/source/editor/engines/index.d.ts +3 -0
- package/types/plugins/source/editor/factory.d.ts +3 -0
- package/types/plugins/source/editor/sourceEditor.d.ts +6 -0
- package/types/plugins/source/source.d.ts +17 -0
- package/types/plugins/speech-recognize/config.d.ts +41 -0
- package/types/plugins/speech-recognize/constants.d.ts +4 -0
- package/types/plugins/speech-recognize/helpers/api.d.ts +3 -0
- package/types/plugins/speech-recognize/helpers/exec-spell-command.d.ts +3 -0
- package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +3 -0
- package/types/plugins/speech-recognize/helpers/sound.d.ts +3 -0
- package/types/plugins/speech-recognize/interface.d.ts +12 -0
- package/types/plugins/speech-recognize/speech-recognize.d.ts +5 -0
- package/types/plugins/spellcheck/config.d.ts +4 -0
- package/types/plugins/spellcheck/spellcheck.d.ts +5 -0
- package/types/plugins/stat/stat.d.ts +5 -0
- package/types/plugins/sticky/config.d.ts +19 -0
- package/types/plugins/sticky/sticky.d.ts +18 -0
- package/types/plugins/symbols/symbols.d.ts +11 -0
- package/types/plugins/tab/cases/index.d.ts +3 -0
- package/types/plugins/tab/cases/on-tab-inside-li.d.ts +8 -0
- package/types/plugins/tab/config.d.ts +3 -0
- package/types/plugins/table/table.d.ts +5 -0
- package/types/plugins/table-keyboard-navigation/table-keyboard-navigation.d.ts +8 -0
- package/types/plugins/wrap-nodes/config.d.ts +13 -0
- package/types/plugins/xpath/xpath.d.ts +5 -0
- package/types/styles/icons/index.d.ts +5 -0
- package/types/tsconfig.json +3 -21
- package/esm/plugins/source/editor/engines/custom.js +0 -34
- package/esm/plugins/speech-recognize/config.js +0 -92
- package/esm/plugins/speech-recognize/constants.js +0 -11
- package/esm/plugins/speech-recognize/helpers/api.js +0 -7
- package/esm/plugins/speech-recognize/helpers/exec-spell-command.js +0 -9
- package/esm/plugins/speech-recognize/helpers/recognize-manager.js +0 -168
- package/esm/plugins/speech-recognize/helpers/sound.js +0 -30
- package/esm/plugins/speech-recognize/interface.js +0 -6
- package/esm/plugins/speech-recognize/langs/ar.js +0 -14
- package/esm/plugins/speech-recognize/langs/cs_cz.js +0 -14
- package/esm/plugins/speech-recognize/langs/de.js +0 -14
- package/esm/plugins/speech-recognize/langs/es.js +0 -14
- package/esm/plugins/speech-recognize/langs/fa.js +0 -14
- package/esm/plugins/speech-recognize/langs/fr.js +0 -14
- package/esm/plugins/speech-recognize/langs/he.js +0 -14
- package/esm/plugins/speech-recognize/langs/hu.js +0 -14
- package/esm/plugins/speech-recognize/langs/id.js +0 -14
- package/esm/plugins/speech-recognize/langs/index.js +0 -26
- package/esm/plugins/speech-recognize/langs/it.js +0 -14
- package/esm/plugins/speech-recognize/langs/ja.js +0 -14
- package/esm/plugins/speech-recognize/langs/ko.js +0 -14
- package/esm/plugins/speech-recognize/langs/mn.js +0 -14
- package/esm/plugins/speech-recognize/langs/nl.js +0 -14
- package/esm/plugins/speech-recognize/langs/pl.js +0 -14
- package/esm/plugins/speech-recognize/langs/pt_br.js +0 -14
- package/esm/plugins/speech-recognize/langs/ru.js +0 -14
- package/esm/plugins/speech-recognize/langs/tr.js +0 -14
- package/esm/plugins/speech-recognize/langs/zh_cn.js +0 -14
- package/esm/plugins/speech-recognize/langs/zh_tw.js +0 -14
- package/esm/plugins/speech-recognize/speech-recognize.js +0 -115
- package/esm/polyfills.js +0 -54
- package/types/plugins/source/editor/engines/custom.d.ts +0 -24
- package/types/polyfills.d.ts +0 -10
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/** Asserts that condition is truthy (or evaluates to true). */
|
|
6
7
|
declare function assert<T>(condition: T | false | 0 | '' | null | undefined, message: string): asserts condition;
|
|
7
8
|
export { assert };
|
|
@@ -4,7 +4,19 @@
|
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import type { IDictionary } from "../../../types";
|
|
7
|
+
/**
|
|
8
|
+
* Get attribute
|
|
9
|
+
*/
|
|
7
10
|
export declare function attr(elm: Element, key: string): null | string;
|
|
11
|
+
/**
|
|
12
|
+
* Remove attribute
|
|
13
|
+
*/
|
|
8
14
|
export declare function attr(elm: Element, key: string, value: null): void;
|
|
15
|
+
/**
|
|
16
|
+
* Set attribute
|
|
17
|
+
*/
|
|
9
18
|
export declare function attr(elm: Element, key: string, value: string | number | boolean | undefined | null): null;
|
|
19
|
+
/**
|
|
20
|
+
* Set or remove several attributes
|
|
21
|
+
*/
|
|
10
22
|
export declare function attr(elm: Element, attributes: IDictionary<string | number | boolean | null>): null;
|
|
@@ -3,4 +3,18 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Module returns method that is used to determine the browser
|
|
11
|
+
* @example
|
|
12
|
+
* ```javascript
|
|
13
|
+
* console.log(Jodit.modules.Helpers.browser('mse'));
|
|
14
|
+
* console.log(Jodit.modules.Helpers.browser('chrome'));
|
|
15
|
+
* console.log($Jodit.modules.Helpers.browser('opera'));
|
|
16
|
+
* console.log(Jodit.modules.Helpers.browser('firefox'));
|
|
17
|
+
* console.log(Jodit.modules.Helpers.browser('mse') && Jodit.modules.Helpers.browser('version') > 10);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
6
20
|
export declare const browser: (browser: string) => boolean | string;
|
|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Build query string
|
|
12
|
+
*/
|
|
7
13
|
export declare const buildQuery: (data: IDictionary, prefix?: string) => string;
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export declare const completeUrl: (url: string) => string;
|
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* @example
|
|
12
|
+
* ```js
|
|
13
|
+
* const defaultConfig = {
|
|
14
|
+
* a: {
|
|
15
|
+
* b: {
|
|
16
|
+
* c: 2
|
|
17
|
+
* },
|
|
18
|
+
* e: 5
|
|
19
|
+
* },
|
|
20
|
+
* d: {
|
|
21
|
+
* g: 7
|
|
22
|
+
* }
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* const options = ConfigProto({a: {
|
|
26
|
+
* b: {
|
|
27
|
+
* c: 1
|
|
28
|
+
* }
|
|
29
|
+
* }}, defaultConfig);
|
|
30
|
+
*
|
|
31
|
+
* console.log(options.a.b.c); // 1
|
|
32
|
+
* console.log(options.a.e); // 5
|
|
33
|
+
* console.log(options.d.g); // 7
|
|
34
|
+
*
|
|
35
|
+
* defaultConfig.d.g = 8;
|
|
36
|
+
* console.log(options.d.g); // 8
|
|
37
|
+
*
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
7
40
|
export declare function ConfigProto(options: IDictionary, proto: IDictionary, deep?: number): IDictionary;
|
|
8
41
|
export declare function ConfigFlatten(obj: IDictionary): IDictionary;
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
8
|
+
*/
|
|
6
9
|
export declare const convertMediaUrlToVideoEmbed: (url: string, width?: number, height?: number) => string;
|
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IStyle, StyleValue } from "../../../types";
|
|
7
10
|
export declare function css(element: HTMLElement, key: keyof CSSStyleDeclaration): string | number;
|
|
8
11
|
export declare function css(element: HTMLElement, key: string | IStyle): string | number;
|
|
9
12
|
export declare function css(element: HTMLElement, key: string | IStyle, value: StyleValue): string | number;
|
|
10
13
|
export declare function css(element: HTMLElement, key: string | IStyle, onlyStyleMode: boolean): string | number;
|
|
14
|
+
/**
|
|
15
|
+
* Clear center align
|
|
16
|
+
*/
|
|
11
17
|
export declare const clearCenterAlign: (image: HTMLElement) => void;
|
|
@@ -3,4 +3,11 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* CTRL pressed
|
|
11
|
+
* @returns true ctrl key was pressed
|
|
12
|
+
*/
|
|
6
13
|
export declare const ctrlKey: (e: MouseEvent | KeyboardEvent) => boolean;
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IViewComponent } from "../../../types";
|
|
7
10
|
export declare const dataBind: <T = any>(elm: IViewComponent | Node | object, key: string, value?: T | undefined) => T;
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Try define user language
|
|
8
|
+
*/
|
|
6
9
|
export declare const defaultLanguage: (language?: string, defaultLanguage?: string) => string;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Helper for create Error object
|
|
8
|
+
*/
|
|
6
9
|
export declare function error(message: string): Error;
|
|
7
10
|
export declare function connection(message: string): Error;
|
|
8
11
|
export declare function options(message: string): Error;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export declare class AbortError extends Error {
|
|
7
10
|
constructor(m: string);
|
|
8
11
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export declare class ConnectionError extends Error {
|
|
7
10
|
constructor(m: string);
|
|
8
11
|
}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export * from "./abort-error";
|
|
7
10
|
export * from "./connection-error";
|
|
8
11
|
export * from "./options-error";
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export declare class OptionsError extends TypeError {
|
|
7
10
|
constructor(m: string);
|
|
8
11
|
}
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export * from "./error";
|
|
7
10
|
export * from "./errors/";
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary } from "../../../types";
|
|
7
10
|
export declare const keepNames: Map<Function, string>;
|
|
8
11
|
export declare const getClassName: (obj: IDictionary) => string;
|
|
@@ -3,5 +3,27 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary, Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Safe access in tree object
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```js
|
|
15
|
+
* const obj = {
|
|
16
|
+
* a: {
|
|
17
|
+
* b: {
|
|
18
|
+
* c: {
|
|
19
|
+
* e: false
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* console.log(Jodit.modules.Helpers.get('a.b.c.d.e', obj) === false); // true
|
|
26
|
+
* console.log(Jodit.modules.Helpers.get('a.b.a.d.e', obj) === null); // false
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
7
29
|
export declare function get<T>(chain: string, obj: IDictionary): Nullable<T>;
|
|
@@ -3,4 +3,11 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Converts from human readable file size (kb,mb,gb,tb) to bytes
|
|
11
|
+
* @param human - readable file size. Example 1gb or 11.2mb
|
|
12
|
+
*/
|
|
6
13
|
export declare const humanSizeToBytes: (human: string) => number;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export * from "./align";
|
|
7
10
|
export * from "./attr";
|
|
8
11
|
export * from "./append-script";
|
|
@@ -3,5 +3,15 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* By default, terser will remove all `console.*` but
|
|
11
|
+
* if you use this object it will not be
|
|
12
|
+
*/
|
|
6
13
|
export declare const cns: Console;
|
|
14
|
+
/**
|
|
15
|
+
* Mark function as deprecated
|
|
16
|
+
*/
|
|
7
17
|
export declare function markDeprecated(method: Function, names?: string[], ctx?: any): (...args: any[]) => void;
|
|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Parse query string
|
|
12
|
+
*/
|
|
7
13
|
export declare const parseQuery: (queryString: string) => IDictionary<string>;
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IJodit, Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Generates a copy of an HTML document, resizes images, executes JS
|
|
12
|
+
*
|
|
13
|
+
* @event beforePreviewBox(string | undefined, 'pt' | 'px' | '')
|
|
14
|
+
* @event afterPreviewBox(HTMLElement)
|
|
15
|
+
*/
|
|
7
16
|
export declare function previewBox(editor: IJodit, defaultValue?: string, points?: 'pt' | 'px' | '', container?: Nullable<HTMLElement>): [
|
|
8
17
|
HTMLElement,
|
|
9
18
|
() => void
|
|
@@ -3,5 +3,15 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Reset Vanila JS native function
|
|
12
|
+
* @example
|
|
13
|
+
* ```js
|
|
14
|
+
* reset('Array.from')(Set([1,2,3])) // [1, 2, 3]
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
7
17
|
export declare const reset: <T extends Function>(key: string) => Nullable<T>;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* @module helpers/utils
|
|
12
|
+
*/
|
|
7
13
|
export declare const inView: (elm: HTMLElement, root: HTMLElement, doc: Document) => boolean;
|
|
8
14
|
export declare function scrollIntoViewIfNeeded(elm: Nullable<Node>, root: HTMLElement, doc: Document): void;
|
|
@@ -3,10 +3,39 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { HTMLTagNames, IDictionary, IUIElement, Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Find all elements by selector and return Array. If it did not find any element it return empty array
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* Jodit.modules.Helpers.$$('.someselector').forEach(function (elm) {
|
|
16
|
+
* elm.addEventListener('click', function () {
|
|
17
|
+
* alert(''Clicked');
|
|
18
|
+
* });
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
* @param selector - CSS like selector
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
7
24
|
export declare function $$<K extends HTMLTagNames>(selector: K, root: HTMLElement | HTMLDocument | DocumentFragment): Array<HTMLElementTagNameMap[K]>;
|
|
8
25
|
export declare function $$<T extends HTMLElement>(selector: string, root: HTMLElement | HTMLDocument | DocumentFragment): T[];
|
|
26
|
+
/**
|
|
27
|
+
* Calculate XPath selector
|
|
28
|
+
*/
|
|
9
29
|
export declare const getXPathByElement: (element: HTMLElement, root: HTMLElement) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Find all `ref` or `data-ref` elements inside HTMLElement
|
|
32
|
+
*/
|
|
10
33
|
export declare const refs: <T extends HTMLElement>(root: HTMLElement | IUIElement) => IDictionary<T>;
|
|
34
|
+
/**
|
|
35
|
+
* Calculate full CSS selector
|
|
36
|
+
*/
|
|
11
37
|
export declare const cssPath: (el: Element) => Nullable<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Try to find element by selector
|
|
40
|
+
*/
|
|
12
41
|
export declare function resolveElement(element: string | HTMLElement | unknown, od: ShadowRoot | Document): HTMLElement;
|
|
@@ -3,5 +3,21 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Safe access in tree object
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```js
|
|
15
|
+
* const a = {}, b = {};
|
|
16
|
+
* Jodit.modules.Helpers.set('a.b.c.d.e', 1, a);
|
|
17
|
+
* console.log(a);// {a: {b: {c: {d: {e: 1}}}}}
|
|
18
|
+
*
|
|
19
|
+
* Jodit.modules.Helpers.set('a.0.e', 1, b);
|
|
20
|
+
* console.log(b);// {a: [{e: 1}]}
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
7
23
|
export declare function set<T>(chain: string, value: unknown, obj: IDictionary): void;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { CanUndef } from "../../../types";
|
|
7
10
|
export declare class LimitedStack<T> {
|
|
8
11
|
readonly limit: number;
|
|
@@ -3,13 +3,37 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
import type { CanPromise, IControlType, IViewBased, IJodit, RejectablePromise, Nullable } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Call function with parameters
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```js
|
|
15
|
+
* const f = Math.random();
|
|
16
|
+
* Jodit.modules.Helpers.call(f > 0.5 ? Math.ceil : Math.floor, f);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
export declare function call<T extends any[], R>(func: (...args: T) => R, ...args: T): R;
|
|
20
|
+
/**
|
|
21
|
+
* Mark element for debugging
|
|
22
|
+
*/
|
|
8
23
|
export declare function markOwner(jodit: IViewBased, elm: HTMLElement): void;
|
|
9
24
|
export declare function callPromise(condition: CanPromise<unknown>, callback: () => CanPromise<any>): CanPromise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Allow load image in promise
|
|
27
|
+
*/
|
|
10
28
|
export declare const loadImage: (src: string, jodit: IViewBased) => RejectablePromise<HTMLImageElement>;
|
|
11
29
|
export declare const keys: (obj: object, own?: boolean) => string[];
|
|
30
|
+
/**
|
|
31
|
+
* Memorize last user chose
|
|
32
|
+
*/
|
|
12
33
|
export declare const memorizeExec: <T extends IJodit = IJodit>(editor: T, _: unknown, { control }: {
|
|
13
34
|
control: IControlType<T, import("../../../types").IToolbarButton>;
|
|
14
35
|
}, preProcessValue?: ((value: string) => string) | undefined) => void | false;
|
|
36
|
+
/**
|
|
37
|
+
* Get DataTransfer from different event types
|
|
38
|
+
*/
|
|
15
39
|
export declare const getDataTransfer: (event: ClipboardEvent | DragEvent) => Nullable<DataTransfer>;
|
|
@@ -3,4 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module helpers/utils
|
|
8
|
+
*/
|
|
6
9
|
export declare const val: (elm: HTMLInputElement | HTMLElement, selector: string, value?: string | null) => string;
|
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module plugin
|
|
8
|
+
*/
|
|
6
9
|
import type { IDictionary, IJodit, PluginInstance } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Init plugin and try init waiting list
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
7
14
|
export declare function initInstance(jodit: IJodit, pluginName: string, instance: PluginInstance, doneList: Set<string>, waitingList: IDictionary<PluginInstance>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Init plugin if it has not dependencies in another case wait requires plugins will be init
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
8
19
|
export declare function init(jodit: IJodit, pluginName: string, instance: PluginInstance, doneList: Set<string>, waitingList: IDictionary<PluginInstance>): boolean;
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module plugin
|
|
8
|
+
*/
|
|
6
9
|
import type { IExtraPlugin, IJodit, PluginType } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
7
13
|
export declare function loadStyle(jodit: IJodit, pluginName: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
8
17
|
export declare function loadExtras(items: Map<string, PluginType>, jodit: IJodit, extrasList: IExtraPlugin[], callback: () => void): void;
|
|
@@ -3,5 +3,12 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module plugin
|
|
8
|
+
*/
|
|
6
9
|
import type { IJodit, Nullable, PluginInstance, PluginType } from "../../../types";
|
|
10
|
+
/**
|
|
11
|
+
* Create instance of plugin
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
7
14
|
export declare function makeInstance(jodit: IJodit, plugin: PluginType): Nullable<PluginInstance>;
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module plugin
|
|
8
|
+
*/
|
|
6
9
|
export * from "./plugin-system";
|
|
7
10
|
export * from "./plugin";
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
declare module 'jodit/types/events' {
|
|
7
7
|
interface IEventEmitter {
|
|
8
|
+
/**
|
|
9
|
+
* Emitted every time after the plugins have been initialized
|
|
10
|
+
* or a deferred plugin has been loaded and also initialized
|
|
11
|
+
*/
|
|
8
12
|
on(event: 'updatePlugins', callback: () => void): this;
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -3,14 +3,44 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* @module plugin
|
|
8
|
+
*/
|
|
6
9
|
import type { IJodit, IPluginSystem, PluginType } from "../../types";
|
|
7
10
|
import "./interface";
|
|
11
|
+
/**
|
|
12
|
+
* Jodit plugin system
|
|
13
|
+
* @example
|
|
14
|
+
* ```js
|
|
15
|
+
* Jodit.plugins.add('emoji2', {
|
|
16
|
+
* init() {
|
|
17
|
+
* alert('emoji Inited2')
|
|
18
|
+
* },
|
|
19
|
+
* destruct() {}
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
8
23
|
export declare class PluginSystem implements IPluginSystem {
|
|
9
24
|
private __items;
|
|
25
|
+
/**
|
|
26
|
+
* Add plugin in store
|
|
27
|
+
*/
|
|
10
28
|
add(name: string, plugin: PluginType): void;
|
|
29
|
+
/**
|
|
30
|
+
* Get plugin from store
|
|
31
|
+
*/
|
|
11
32
|
get(name: string): PluginType | void;
|
|
33
|
+
/**
|
|
34
|
+
* Remove plugin from store
|
|
35
|
+
*/
|
|
12
36
|
remove(name: string): void;
|
|
13
37
|
private __filter;
|
|
38
|
+
/**
|
|
39
|
+
* Public method for async init all plugins
|
|
40
|
+
*/
|
|
14
41
|
__init(jodit: IJodit): void;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the promise to wait for the plugin to load.
|
|
44
|
+
*/
|
|
15
45
|
wait(name: string): Promise<void>;
|
|
16
46
|
}
|
|
@@ -3,12 +3,22 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* [[include:core/plugin/README.md]]
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @module plugin
|
|
10
|
+
*/
|
|
6
11
|
import type { IJodit, IPlugin, IViewBased } from "../../types";
|
|
7
12
|
import { ViewComponent } from "../component";
|
|
8
13
|
export declare abstract class Plugin<T extends IViewBased = IJodit> extends ViewComponent<T> implements IPlugin<T> {
|
|
9
14
|
requires: string[];
|
|
15
|
+
/** @override */
|
|
10
16
|
buttons: IPlugin['buttons'];
|
|
17
|
+
/**
|
|
18
|
+
* Plugin have CSS style and it should be loaded
|
|
19
|
+
*/
|
|
11
20
|
hasStyle: boolean;
|
|
21
|
+
/** @override */
|
|
12
22
|
className(): string;
|
|
13
23
|
protected abstract afterInit(jodit: T): void;
|
|
14
24
|
protected abstract beforeDestruct(jodit: T): void;
|