jodit-pro 4.9.21 → 4.9.25
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 +63 -1
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +43 -43
- package/es2015/jodit.js +238 -87
- package/es2015/jodit.min.js +6 -6
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +193 -161
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +30 -30
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.js +28 -28
- package/es2018/jodit.min.js +6 -6
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +20 -20
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +29 -29
- package/es2021/jodit.js +238 -87
- package/es2021/jodit.min.js +8 -8
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +194 -162
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +20 -20
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +83 -83
- package/es2021.en/jodit.js +238 -87
- package/es2021.en/jodit.min.js +8 -8
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +194 -162
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +20 -20
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +256 -87
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +221 -174
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/plugins/ai-assistant-pro/ui/input-area/input-area.d.ts +5 -1
- package/esm/plugins/ai-assistant-pro/ui/main-panel/main-panel.d.ts +1 -1
- package/esm/plugins/ai-assistant-pro/ui/settings-button/settings-button.d.ts +7 -1
- package/esm/plugins/ai-assistant-pro/ui/settings-popup/dialog-settings.d.ts +3 -1
- package/esm/plugins/ai-assistant-pro/ui/settings-popup/global-settings.d.ts +5 -1
- package/esm/plugins/ai-assistant-pro/ui/settings-popup/settings-popup.d.ts +7 -1
- package/package.json +1 -1
- package/types/plugins/ai-assistant-pro/ui/input-area/input-area.d.ts +5 -1
- package/types/plugins/ai-assistant-pro/ui/main-panel/main-panel.d.ts +1 -1
- package/types/plugins/ai-assistant-pro/ui/settings-button/settings-button.d.ts +7 -1
- package/types/plugins/ai-assistant-pro/ui/settings-popup/dialog-settings.d.ts +3 -1
- package/types/plugins/ai-assistant-pro/ui/settings-popup/global-settings.d.ts +5 -1
- package/types/plugins/ai-assistant-pro/ui/settings-popup/settings-popup.d.ts +7 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.9.
|
|
4
|
+
* Version: v4.9.25
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -3477,7 +3477,7 @@ class JoditPro extends jodit_esm_index__WEBPACK_IMPORTED_MODULE_4__.Jodit {
|
|
|
3477
3477
|
}
|
|
3478
3478
|
/**
|
|
3479
3479
|
* Get temporary list
|
|
3480
|
-
* @deprecated
|
|
3480
|
+
* @deprecated Just do not use it, it is not needed anymore
|
|
3481
3481
|
*/ static temporaryList(root) {
|
|
3482
3482
|
return (0,_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_1__.toArray)(root.querySelectorAll(`[${_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEMP_ATTR}]`));
|
|
3483
3483
|
}
|
|
@@ -4906,7 +4906,96 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4906
4906
|
|
|
4907
4907
|
let ConfigPrototype = {};
|
|
4908
4908
|
/**
|
|
4909
|
-
* Default Editor's Configuration
|
|
4909
|
+
* Default Editor's Configuration.
|
|
4910
|
+
*
|
|
4911
|
+
* This class holds all default option values for the Jodit editor.
|
|
4912
|
+
* It uses a **private constructor** and a **lazy singleton** pattern — the single instance
|
|
4913
|
+
* is created on the first access to {@link Config.defaultOptions} (also available as `Jodit.defaultOptions`).
|
|
4914
|
+
*
|
|
4915
|
+
* ## How options are resolved
|
|
4916
|
+
*
|
|
4917
|
+
* When you create an editor with `Jodit.make('#editor', userOptions)`, the library
|
|
4918
|
+
* calls {@link ConfigProto}(userOptions, Config.defaultOptions). `ConfigProto` does
|
|
4919
|
+
* **not** deep-clone the defaults. Instead it creates a new object whose JavaScript
|
|
4920
|
+
* prototype is `Config.defaultOptions`:
|
|
4921
|
+
*
|
|
4922
|
+
* ```
|
|
4923
|
+
* userOptions ──[[Prototype]]──► Config.defaultOptions
|
|
4924
|
+
* ```
|
|
4925
|
+
*
|
|
4926
|
+
* Any key present in `userOptions` shadows the default;
|
|
4927
|
+
* any key **not** present falls through to `Config.defaultOptions` via the prototype chain.
|
|
4928
|
+
* Nested plain objects are recursively prototyped in the same way, so partial overrides
|
|
4929
|
+
* of nested options work automatically:
|
|
4930
|
+
*
|
|
4931
|
+
* ```js
|
|
4932
|
+
* // Only override `dialogWidth`; all other `image.*` defaults are still available
|
|
4933
|
+
* Jodit.make('#editor', {
|
|
4934
|
+
* image: { dialogWidth: 500 }
|
|
4935
|
+
* });
|
|
4936
|
+
* ```
|
|
4937
|
+
*
|
|
4938
|
+
* ## How plugins extend the config
|
|
4939
|
+
*
|
|
4940
|
+
* Each plugin adds its own defaults by assigning to `Config.prototype` and augmenting
|
|
4941
|
+
* the TypeScript type with `declare module`:
|
|
4942
|
+
*
|
|
4943
|
+
* ```ts
|
|
4944
|
+
* // 1. Type augmentation (compile-time)
|
|
4945
|
+
* declare module 'jodit/config' {
|
|
4946
|
+
* interface Config {
|
|
4947
|
+
* toolbarSticky: boolean;
|
|
4948
|
+
* }
|
|
4949
|
+
* }
|
|
4950
|
+
*
|
|
4951
|
+
* // 2. Runtime default
|
|
4952
|
+
* Config.prototype.toolbarSticky = true;
|
|
4953
|
+
* ```
|
|
4954
|
+
*
|
|
4955
|
+
* Because the constructor runs `Object.assign(this, ConfigPrototype)` (where
|
|
4956
|
+
* `ConfigPrototype` is captured as `Config.prototype` after the class definition),
|
|
4957
|
+
* all prototype-level values — including those added by plugins — are materialized
|
|
4958
|
+
* as own properties on the singleton. This means `Config.defaultOptions` always
|
|
4959
|
+
* contains every registered option as an own, enumerable property.
|
|
4960
|
+
*
|
|
4961
|
+
* ## Changing global defaults
|
|
4962
|
+
*
|
|
4963
|
+
* You can modify `Jodit.defaultOptions` **before** creating editors to change
|
|
4964
|
+
* defaults globally:
|
|
4965
|
+
*
|
|
4966
|
+
* ```js
|
|
4967
|
+
* Jodit.defaultOptions.language = 'de';
|
|
4968
|
+
* Jodit.defaultOptions.theme = 'dark';
|
|
4969
|
+
*
|
|
4970
|
+
* // Both editors inherit the new defaults
|
|
4971
|
+
* Jodit.make('#editor1');
|
|
4972
|
+
* Jodit.make('#editor2');
|
|
4973
|
+
* ```
|
|
4974
|
+
*
|
|
4975
|
+
* ## `Jodit.atom` — preventing deep merge
|
|
4976
|
+
*
|
|
4977
|
+
* By default, `ConfigProto` deep-merges nested plain objects and arrays.
|
|
4978
|
+
* Wrap a value with `Jodit.atom(value)` to make it **atomic** — it will completely
|
|
4979
|
+
* replace the default instead of being merged:
|
|
4980
|
+
*
|
|
4981
|
+
* ```js
|
|
4982
|
+
* Jodit.make('#editor', {
|
|
4983
|
+
* controls: {
|
|
4984
|
+
* fontsize: {
|
|
4985
|
+
* // Replace the entire list rather than merging with the default one
|
|
4986
|
+
* list: Jodit.atom([8, 9, 10])
|
|
4987
|
+
* }
|
|
4988
|
+
* }
|
|
4989
|
+
* });
|
|
4990
|
+
* ```
|
|
4991
|
+
*
|
|
4992
|
+
* `Jodit.atom` calls {@link markAsAtomic}, which sets a non-enumerable
|
|
4993
|
+
* `isAtom` flag on the object. `ConfigProto` checks this flag and skips
|
|
4994
|
+
* recursive merging when it is present. Note: top-level arrays (depth 0)
|
|
4995
|
+
* are always treated as atomic — they replace rather than merge.
|
|
4996
|
+
*
|
|
4997
|
+
* @see {@link ConfigProto} for the full merge algorithm
|
|
4998
|
+
* @see {@link markAsAtomic} / {@link isAtom} for the atom marker implementation
|
|
4910
4999
|
*/ class Config {
|
|
4911
5000
|
static get defaultOptions() {
|
|
4912
5001
|
if (!Config.__defaultOptions) {
|
|
@@ -4916,31 +5005,32 @@ let ConfigPrototype = {};
|
|
|
4916
5005
|
}
|
|
4917
5006
|
constructor(){
|
|
4918
5007
|
/**
|
|
4919
|
-
*
|
|
5008
|
+
* When enabled, the editor caches the results of expensive computations (e.g. toolbar rebuilds)
|
|
5009
|
+
* to improve performance. Disable for debugging or when options change frequently at runtime.
|
|
4920
5010
|
*/ this.cache = true;
|
|
4921
5011
|
/**
|
|
4922
5012
|
* Timeout of all asynchronous methods
|
|
4923
5013
|
*/ this.defaultTimeout = 100;
|
|
4924
|
-
|
|
5014
|
+
/**
|
|
5015
|
+
* Prefix used for CSS class names and local-storage keys to avoid collisions
|
|
5016
|
+
* when multiple editor instances or applications share the same page.
|
|
5017
|
+
*/ this.namespace = '';
|
|
4925
5018
|
/**
|
|
4926
5019
|
* Editor loads completely without plugins. Useful when debugging your own plugin.
|
|
4927
5020
|
*/ this.safeMode = false;
|
|
4928
5021
|
/**
|
|
4929
5022
|
* Editor's width
|
|
4930
5023
|
*
|
|
4931
|
-
* @example
|
|
4932
5024
|
* ```javascript
|
|
4933
5025
|
* Jodit.make('.editor', {
|
|
4934
5026
|
* width: '100%',
|
|
4935
5027
|
* })
|
|
4936
5028
|
* ```
|
|
4937
|
-
* @example
|
|
4938
5029
|
* ```javascript
|
|
4939
5030
|
* Jodit.make('.editor', {
|
|
4940
5031
|
* width: 600, // equivalent for '600px'
|
|
4941
5032
|
* })
|
|
4942
5033
|
* ```
|
|
4943
|
-
* @example
|
|
4944
5034
|
* ```javascript
|
|
4945
5035
|
* Jodit.make('.editor', {
|
|
4946
5036
|
* width: 'auto', // autosize
|
|
@@ -4950,19 +5040,16 @@ let ConfigPrototype = {};
|
|
|
4950
5040
|
/**
|
|
4951
5041
|
* Editor's height
|
|
4952
5042
|
*
|
|
4953
|
-
* @example
|
|
4954
5043
|
* ```javascript
|
|
4955
5044
|
* Jodit.make('.editor', {
|
|
4956
5045
|
* height: '100%',
|
|
4957
5046
|
* })
|
|
4958
5047
|
* ```
|
|
4959
|
-
* @example
|
|
4960
5048
|
* ```javascript
|
|
4961
5049
|
* Jodit.make('.editor', {
|
|
4962
5050
|
* height: 600, // equivalent for '600px'
|
|
4963
5051
|
* })
|
|
4964
5052
|
* ```
|
|
4965
|
-
* @example
|
|
4966
5053
|
* ```javascript
|
|
4967
5054
|
* Jodit.make('.editor', {
|
|
4968
5055
|
* height: 'auto', // default - autosize
|
|
@@ -4999,7 +5086,32 @@ let ConfigPrototype = {};
|
|
|
4999
5086
|
* });
|
|
5000
5087
|
* ```
|
|
5001
5088
|
*/ this.preset = 'custom';
|
|
5002
|
-
|
|
5089
|
+
/**
|
|
5090
|
+
* Dictionary of named configuration presets. Each key is a preset name and the value
|
|
5091
|
+
* is a partial options object that will be merged into the editor config when
|
|
5092
|
+
* {@link Config.preset} matches the key.
|
|
5093
|
+
*
|
|
5094
|
+
* ```javascript
|
|
5095
|
+
* // Use a built-in preset
|
|
5096
|
+
* Jodit.make('#editor', {
|
|
5097
|
+
* preset: 'inline'
|
|
5098
|
+
* });
|
|
5099
|
+
* ```
|
|
5100
|
+
*
|
|
5101
|
+
* ```javascript
|
|
5102
|
+
* // Define and use a custom preset
|
|
5103
|
+
* Jodit.defaultOptions.presets.myCompact = {
|
|
5104
|
+
* toolbarButtonSize: 'small',
|
|
5105
|
+
* showCharsCounter: false,
|
|
5106
|
+
* showWordsCounter: false,
|
|
5107
|
+
* showXPathInStatusbar: false
|
|
5108
|
+
* };
|
|
5109
|
+
*
|
|
5110
|
+
* Jodit.make('#editor', {
|
|
5111
|
+
* preset: 'myCompact'
|
|
5112
|
+
* });
|
|
5113
|
+
* ```
|
|
5114
|
+
*/ this.presets = {
|
|
5003
5115
|
inline: {
|
|
5004
5116
|
inline: true,
|
|
5005
5117
|
toolbar: false,
|
|
@@ -5011,7 +5123,10 @@ let ConfigPrototype = {};
|
|
|
5011
5123
|
showPlaceholder: false
|
|
5012
5124
|
}
|
|
5013
5125
|
};
|
|
5014
|
-
|
|
5126
|
+
/**
|
|
5127
|
+
* The Document object the editor operates within. Defaults to the current `document`.
|
|
5128
|
+
* Override when the editor is created inside an iframe or a different browsing context.
|
|
5129
|
+
*/ this.ownerDocument = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
|
|
5015
5130
|
/**
|
|
5016
5131
|
* Allows you to specify the window in which the editor will be created. Default - window
|
|
5017
5132
|
* This is necessary if you are creating the editor inside an iframe but the code is running in the parent window
|
|
@@ -5042,7 +5157,9 @@ let ConfigPrototype = {};
|
|
|
5042
5157
|
* ```
|
|
5043
5158
|
*/ this.shadowRoot = null;
|
|
5044
5159
|
/**
|
|
5045
|
-
* z-index
|
|
5160
|
+
* Base CSS `z-index` for the editor UI (toolbar, popups, dialogs).
|
|
5161
|
+
* Set to a higher value when other page elements overlap the editor.
|
|
5162
|
+
* `0` means no explicit z-index is applied.
|
|
5046
5163
|
*/ this.zIndex = 0;
|
|
5047
5164
|
/**
|
|
5048
5165
|
* Change the read-only state of the editor
|
|
@@ -5078,7 +5195,6 @@ let ConfigPrototype = {};
|
|
|
5078
5195
|
/**
|
|
5079
5196
|
* Size of icons in the toolbar (can be "small", "middle", "large")
|
|
5080
5197
|
*
|
|
5081
|
-
* @example
|
|
5082
5198
|
* ```javascript
|
|
5083
5199
|
* const editor = Jodit.make(".dark_editor", {
|
|
5084
5200
|
* toolbarButtonSize: "small"
|
|
@@ -5089,11 +5205,13 @@ let ConfigPrototype = {};
|
|
|
5089
5205
|
* Allow navigation in the toolbar of the editor by Tab key
|
|
5090
5206
|
*/ this.allowTabNavigation = false;
|
|
5091
5207
|
/**
|
|
5092
|
-
*
|
|
5208
|
+
* When enabled, the editor renders without its own container chrome (toolbar, borders, statusbar).
|
|
5209
|
+
* The editable area becomes the element itself. Typically combined with
|
|
5210
|
+
* `toolbarInline: true` so a floating toolbar appears on selection.
|
|
5093
5211
|
*/ this.inline = false;
|
|
5094
5212
|
/**
|
|
5095
5213
|
* Theme (can be "dark")
|
|
5096
|
-
*
|
|
5214
|
+
*
|
|
5097
5215
|
* ```javascript
|
|
5098
5216
|
* const editor = Jodit.make(".dark_editor", {
|
|
5099
5217
|
* theme: "dark"
|
|
@@ -5106,10 +5224,9 @@ let ConfigPrototype = {};
|
|
|
5106
5224
|
/**
|
|
5107
5225
|
* Class name that can be appended to the editable area
|
|
5108
5226
|
*
|
|
5109
|
-
* @see
|
|
5110
|
-
* @see
|
|
5227
|
+
* @see {@link Config.iframeCSSLinks}
|
|
5228
|
+
* @see {@link Config.iframeStyle}
|
|
5111
5229
|
*
|
|
5112
|
-
* @example
|
|
5113
5230
|
* ```javascript
|
|
5114
5231
|
* Jodit.make('#editor', {
|
|
5115
5232
|
* editorClassName: 'some_my_class'
|
|
@@ -5125,7 +5242,7 @@ let ConfigPrototype = {};
|
|
|
5125
5242
|
*/ this.editorClassName = false;
|
|
5126
5243
|
/**
|
|
5127
5244
|
* Class name that can be appended to the main editor container
|
|
5128
|
-
*
|
|
5245
|
+
*
|
|
5129
5246
|
* ```javascript
|
|
5130
5247
|
* const jodit = Jodit.make('#editor', {
|
|
5131
5248
|
* className: 'some_my_class'
|
|
@@ -5145,7 +5262,7 @@ let ConfigPrototype = {};
|
|
|
5145
5262
|
/**
|
|
5146
5263
|
* The internal styles of the editable area. They are intended to change
|
|
5147
5264
|
* not the appearance of the editor, but to change the appearance of the content.
|
|
5148
|
-
*
|
|
5265
|
+
*
|
|
5149
5266
|
* ```javascript
|
|
5150
5267
|
* Jodit.make('#editor', {
|
|
5151
5268
|
* style: {
|
|
@@ -5156,13 +5273,14 @@ let ConfigPrototype = {};
|
|
|
5156
5273
|
* ```
|
|
5157
5274
|
*/ this.style = false;
|
|
5158
5275
|
/**
|
|
5276
|
+
* Inline CSS styles applied to the outer editor container element.
|
|
5277
|
+
* Use this to style the editor wrapper (borders, background, etc.) without affecting content.
|
|
5159
5278
|
*
|
|
5160
|
-
* @example
|
|
5161
5279
|
* ```javascript
|
|
5162
5280
|
* Jodit.make('#editor', {
|
|
5163
|
-
*
|
|
5164
|
-
*
|
|
5165
|
-
*
|
|
5281
|
+
* containerStyle: {
|
|
5282
|
+
* border: '1px solid #ccc',
|
|
5283
|
+
* background: '#f9f9f9'
|
|
5166
5284
|
* }
|
|
5167
5285
|
* });
|
|
5168
5286
|
* ```
|
|
@@ -5171,7 +5289,6 @@ let ConfigPrototype = {};
|
|
|
5171
5289
|
* Dictionary of variable values in css, a complete list can be found here
|
|
5172
5290
|
* https://github.com/xdan/jodit/blob/main/src/styles/variables.less#L25
|
|
5173
5291
|
*
|
|
5174
|
-
* @example
|
|
5175
5292
|
* ```js
|
|
5176
5293
|
* const editor = Jodit.make('#editor', {
|
|
5177
5294
|
* styleValues: {
|
|
@@ -5183,9 +5300,9 @@ let ConfigPrototype = {};
|
|
|
5183
5300
|
* ```
|
|
5184
5301
|
*/ this.styleValues = {};
|
|
5185
5302
|
/**
|
|
5186
|
-
*
|
|
5303
|
+
* When enabled, the editor dispatches a native `change` event on the original
|
|
5304
|
+
* `<textarea>` element whenever the content changes, so standard DOM listeners work.
|
|
5187
5305
|
*
|
|
5188
|
-
* @example
|
|
5189
5306
|
* ```javascript
|
|
5190
5307
|
* const editor = Jodit.make('#editor');
|
|
5191
5308
|
* document.getElementById('editor').addEventListener('change', function () {
|
|
@@ -5199,7 +5316,6 @@ let ConfigPrototype = {};
|
|
|
5199
5316
|
* the page element direction. 'ltr' – Indicates a Left-To-Right text direction (like in English).
|
|
5200
5317
|
* 'rtl' – Indicates a Right-To-Left text direction (like in Arabic).
|
|
5201
5318
|
*
|
|
5202
|
-
* @example
|
|
5203
5319
|
* ```javascript
|
|
5204
5320
|
* Jodit.make('.editor', {
|
|
5205
5321
|
* direction: 'rtl'
|
|
@@ -5211,7 +5327,6 @@ let ConfigPrototype = {};
|
|
|
5211
5327
|
* (navigator.language && navigator.language.substr(0, 2)) ||
|
|
5212
5328
|
* (navigator.browserLanguage && navigator.browserLanguage.substr(0, 2)) || 'en'
|
|
5213
5329
|
*
|
|
5214
|
-
* @example
|
|
5215
5330
|
* ```html
|
|
5216
5331
|
* <!-- include in you page lang file -->
|
|
5217
5332
|
* <script src="jodit/lang/de.js"></script>
|
|
@@ -5225,7 +5340,6 @@ let ConfigPrototype = {};
|
|
|
5225
5340
|
/**
|
|
5226
5341
|
* if true all Lang.i18n(key) return `{key}`
|
|
5227
5342
|
*
|
|
5228
|
-
* @example
|
|
5229
5343
|
* ```html
|
|
5230
5344
|
* <script>
|
|
5231
5345
|
* var editor = Jodit.make('.editor', {
|
|
@@ -5239,7 +5353,6 @@ let ConfigPrototype = {};
|
|
|
5239
5353
|
/**
|
|
5240
5354
|
* Collection of language pack data `{en: {'Type something': 'Type something', ...}}`
|
|
5241
5355
|
*
|
|
5242
|
-
* @example
|
|
5243
5356
|
* ```javascript
|
|
5244
5357
|
* const editor = Jodit.make('#editor', {
|
|
5245
5358
|
* language: 'ru',
|
|
@@ -5271,11 +5384,11 @@ let ConfigPrototype = {};
|
|
|
5271
5384
|
* Delay before show tooltip
|
|
5272
5385
|
*/ this.showTooltipDelay = 200;
|
|
5273
5386
|
/**
|
|
5274
|
-
* Instead of
|
|
5387
|
+
* Instead of creating a custom tooltip, use the browser's native title tooltips
|
|
5275
5388
|
*/ this.useNativeTooltip = false;
|
|
5276
5389
|
/**
|
|
5277
|
-
*
|
|
5278
|
-
*
|
|
5390
|
+
* How pasted content is inserted into the editor by default.
|
|
5391
|
+
* Possible values: `insert_as_html`, `insert_as_text`, `insert_only_text`, `insert_clear_html`.
|
|
5279
5392
|
*/ this.defaultActionOnPaste = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML;
|
|
5280
5393
|
// TODO
|
|
5281
5394
|
// autosave: false, // false or url
|
|
@@ -5288,7 +5401,6 @@ let ConfigPrototype = {};
|
|
|
5288
5401
|
/**
|
|
5289
5402
|
* When this option is enabled, the editor's content will be placed in an iframe and isolated from the rest of the page.
|
|
5290
5403
|
*
|
|
5291
|
-
* @example
|
|
5292
5404
|
* ```javascript
|
|
5293
5405
|
* Jodit.make('#editor', {
|
|
5294
5406
|
* iframe: true,
|
|
@@ -5300,7 +5412,7 @@ let ConfigPrototype = {};
|
|
|
5300
5412
|
/**
|
|
5301
5413
|
* Allow editing the entire HTML document(html, head)
|
|
5302
5414
|
* \> Works together with the iframe option.
|
|
5303
|
-
*
|
|
5415
|
+
*
|
|
5304
5416
|
* ```js
|
|
5305
5417
|
* const editor = Jodit.make('#editor', {
|
|
5306
5418
|
* iframe: true,
|
|
@@ -5319,7 +5431,7 @@ let ConfigPrototype = {};
|
|
|
5319
5431
|
/**
|
|
5320
5432
|
* Jodit.MODE_WYSIWYG The HTML editor allows you to write like MSWord,
|
|
5321
5433
|
* Jodit.MODE_SOURCE syntax highlighting source editor
|
|
5322
|
-
*
|
|
5434
|
+
*
|
|
5323
5435
|
* ```javascript
|
|
5324
5436
|
* var editor = Jodit.make('#editor', {
|
|
5325
5437
|
* defaultMode: Jodit.MODE_SPLIT
|
|
@@ -5328,11 +5440,11 @@ let ConfigPrototype = {};
|
|
|
5328
5440
|
* ```
|
|
5329
5441
|
*/ this.defaultMode = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG;
|
|
5330
5442
|
/**
|
|
5331
|
-
*
|
|
5443
|
+
* When enabled, the editor displays both the WYSIWYG view and the source-code view side by side.
|
|
5332
5444
|
*/ this.useSplitMode = false;
|
|
5333
5445
|
/**
|
|
5334
5446
|
* The colors in HEX representation to select a color for the background and for the text in colorpicker
|
|
5335
|
-
*
|
|
5447
|
+
*
|
|
5336
5448
|
* ```javascript
|
|
5337
5449
|
* Jodit.make('#editor', {
|
|
5338
5450
|
* colors: ['#ff0000', '#00ff00', '#0000ff']
|
|
@@ -5428,7 +5540,7 @@ let ConfigPrototype = {};
|
|
|
5428
5540
|
};
|
|
5429
5541
|
/**
|
|
5430
5542
|
* The default tab color picker
|
|
5431
|
-
*
|
|
5543
|
+
*
|
|
5432
5544
|
* ```javascript
|
|
5433
5545
|
* Jodit.make('#editor2', {
|
|
5434
5546
|
* colorPickerDefaultTab: 'color'
|
|
@@ -5436,11 +5548,11 @@ let ConfigPrototype = {};
|
|
|
5436
5548
|
* ```
|
|
5437
5549
|
*/ this.colorPickerDefaultTab = 'background';
|
|
5438
5550
|
/**
|
|
5439
|
-
*
|
|
5551
|
+
* Default width (in pixels) applied to images inserted into the editor
|
|
5440
5552
|
*/ this.imageDefaultWidth = 300;
|
|
5441
5553
|
/**
|
|
5442
5554
|
* Do not display these buttons that are on the list
|
|
5443
|
-
*
|
|
5555
|
+
*
|
|
5444
5556
|
* ```javascript
|
|
5445
5557
|
* Jodit.make('#editor2', {
|
|
5446
5558
|
* removeButtons: ['hr', 'source']
|
|
@@ -5449,7 +5561,7 @@ let ConfigPrototype = {};
|
|
|
5449
5561
|
*/ this.removeButtons = [];
|
|
5450
5562
|
/**
|
|
5451
5563
|
* Do not init these plugins
|
|
5452
|
-
*
|
|
5564
|
+
*
|
|
5453
5565
|
* ```typescript
|
|
5454
5566
|
* var editor = Jodit.make('.editor', {
|
|
5455
5567
|
* disablePlugins: 'table,iframe'
|
|
@@ -5462,7 +5574,7 @@ let ConfigPrototype = {};
|
|
|
5462
5574
|
*/ this.disablePlugins = [];
|
|
5463
5575
|
/**
|
|
5464
5576
|
* Init and download extra plugins
|
|
5465
|
-
*
|
|
5577
|
+
*
|
|
5466
5578
|
* ```typescript
|
|
5467
5579
|
* var editor = Jodit.make('.editor', {
|
|
5468
5580
|
* extraPlugins: ['emoji']
|
|
@@ -5471,14 +5583,13 @@ let ConfigPrototype = {};
|
|
|
5471
5583
|
* It will try load %SCRIPT_PATH%/plugins/emoji/emoji.js and after load will try init it
|
|
5472
5584
|
*/ this.extraPlugins = [];
|
|
5473
5585
|
/**
|
|
5474
|
-
*
|
|
5586
|
+
* Additional buttons appended to the {@link Config.buttons} list
|
|
5475
5587
|
*/ this.extraButtons = [];
|
|
5476
5588
|
/**
|
|
5477
5589
|
* By default, you can only install an icon from the Jodit suite.
|
|
5478
5590
|
* You can add your icon to the set using the `Jodit.modules.Icon.set (name, svg Code)` method.
|
|
5479
5591
|
* But for a declarative declaration, you can use this option.
|
|
5480
5592
|
*
|
|
5481
|
-
* @example
|
|
5482
5593
|
* ```js
|
|
5483
5594
|
* Jodit.modules.Icon.set('someIcon', '<svg><path.../></svg>');
|
|
5484
5595
|
* const editor = Jodit.make({
|
|
@@ -5487,8 +5598,9 @@ let ConfigPrototype = {};
|
|
|
5487
5598
|
* icon: 'someIcon'
|
|
5488
5599
|
* }]
|
|
5489
5600
|
* });
|
|
5601
|
+
* ```
|
|
5490
5602
|
*
|
|
5491
|
-
*
|
|
5603
|
+
* ```js
|
|
5492
5604
|
* const editor = Jodit.make({
|
|
5493
5605
|
* extraIcons: {
|
|
5494
5606
|
* someIcon: '<svg><path.../></svg>'
|
|
@@ -5499,7 +5611,7 @@ let ConfigPrototype = {};
|
|
|
5499
5611
|
* }]
|
|
5500
5612
|
* });
|
|
5501
5613
|
* ```
|
|
5502
|
-
*
|
|
5614
|
+
*
|
|
5503
5615
|
* ```js
|
|
5504
5616
|
* const editor = Jodit.make({
|
|
5505
5617
|
* extraButtons: [{
|
|
@@ -5511,7 +5623,7 @@ let ConfigPrototype = {};
|
|
|
5511
5623
|
*/ this.extraIcons = {};
|
|
5512
5624
|
/**
|
|
5513
5625
|
* Default attributes for created inside editor elements
|
|
5514
|
-
*
|
|
5626
|
+
*
|
|
5515
5627
|
* ```js
|
|
5516
5628
|
* const editor2 = Jodit.make('#editor', {
|
|
5517
5629
|
* createAttributes: {
|
|
@@ -5531,7 +5643,7 @@ let ConfigPrototype = {};
|
|
|
5531
5643
|
* expect(ul.className).equals('ui-test');
|
|
5532
5644
|
* ```
|
|
5533
5645
|
* Or JSX in React
|
|
5534
|
-
*
|
|
5646
|
+
*
|
|
5535
5647
|
* ```jsx
|
|
5536
5648
|
* import React, {useState, useRef} from 'react';
|
|
5537
5649
|
* import JoditEditor from "jodit-react";
|
|
@@ -5563,7 +5675,7 @@ let ConfigPrototype = {};
|
|
|
5563
5675
|
/**
|
|
5564
5676
|
* The list of buttons that appear in the editor's toolbar on large places (≥ options.sizeLG).
|
|
5565
5677
|
* Note - this is not the width of the device, the width of the editor
|
|
5566
|
-
*
|
|
5678
|
+
*
|
|
5567
5679
|
* ```javascript
|
|
5568
5680
|
* Jodit.make('#editor', {
|
|
5569
5681
|
* buttons: ['bold', 'italic', 'source'],
|
|
@@ -5571,7 +5683,7 @@ let ConfigPrototype = {};
|
|
|
5571
5683
|
* buttonsXS: ['bold', 'fullsize'],
|
|
5572
5684
|
* });
|
|
5573
5685
|
* ```
|
|
5574
|
-
*
|
|
5686
|
+
*
|
|
5575
5687
|
* ```javascript
|
|
5576
5688
|
* Jodit.make('#editor2', {
|
|
5577
5689
|
* buttons: [{
|
|
@@ -5595,7 +5707,7 @@ let ConfigPrototype = {};
|
|
|
5595
5707
|
* }]
|
|
5596
5708
|
* });
|
|
5597
5709
|
* ```
|
|
5598
|
-
*
|
|
5710
|
+
*
|
|
5599
5711
|
* ```javascript
|
|
5600
5712
|
* Jodit.make('#editor2', {
|
|
5601
5713
|
* buttons: Jodit.defaultOptions.buttons.concat([{
|
|
@@ -5716,7 +5828,7 @@ let ConfigPrototype = {};
|
|
|
5716
5828
|
* ```
|
|
5717
5829
|
*/ this.events = {};
|
|
5718
5830
|
/**
|
|
5719
|
-
* Buttons in
|
|
5831
|
+
* Buttons in toolbar without SVG - only texts
|
|
5720
5832
|
*/ this.textIcons = false;
|
|
5721
5833
|
/**
|
|
5722
5834
|
* Element for dialog container
|
|
@@ -7002,7 +7114,7 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
|
|
|
7002
7114
|
}
|
|
7003
7115
|
onChangeText() {
|
|
7004
7116
|
this.text.textContent = this.jodit.i18n(this.state.text);
|
|
7005
|
-
this.
|
|
7117
|
+
this.updateAriaLabel();
|
|
7006
7118
|
}
|
|
7007
7119
|
onChangeTextSetMode() {
|
|
7008
7120
|
this.setMod('text-icons', Boolean(this.state.text.trim().length));
|
|
@@ -7025,9 +7137,9 @@ let UIButton = class UIButton extends _element_js__WEBPACK_IMPORTED_MODULE_9__.U
|
|
|
7025
7137
|
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'title', i8nTooltip);
|
|
7026
7138
|
}
|
|
7027
7139
|
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', i8nTooltip);
|
|
7028
|
-
this.
|
|
7140
|
+
this.updateAriaLabel();
|
|
7029
7141
|
}
|
|
7030
|
-
|
|
7142
|
+
updateAriaLabel() {
|
|
7031
7143
|
const hasText = this.state.text.trim().length > 0;
|
|
7032
7144
|
const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
|
|
7033
7145
|
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_8__.attr)(this.container, 'aria-label', i8nTooltip);
|
|
@@ -7510,6 +7622,9 @@ let ToolbarCollection = class ToolbarCollection extends _core_ui_group_list_js__
|
|
|
7510
7622
|
className() {
|
|
7511
7623
|
return 'ToolbarCollection';
|
|
7512
7624
|
}
|
|
7625
|
+
getRole() {
|
|
7626
|
+
return 'toolbar';
|
|
7627
|
+
}
|
|
7513
7628
|
/**
|
|
7514
7629
|
* First button in a list
|
|
7515
7630
|
*/ get firstButton() {
|
|
@@ -13728,16 +13843,21 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.popup = {
|
|
|
13728
13843
|
|
|
13729
13844
|
|
|
13730
13845
|
let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup {
|
|
13731
|
-
|
|
13846
|
+
className() {
|
|
13732
13847
|
return 'UIList';
|
|
13733
13848
|
}
|
|
13849
|
+
getRole() {
|
|
13850
|
+
return 'list';
|
|
13851
|
+
}
|
|
13734
13852
|
__onChangeMode() {
|
|
13735
13853
|
this.setMod('mode', this.mode);
|
|
13736
13854
|
}
|
|
13737
13855
|
/**
|
|
13738
13856
|
* Make new group and append it in list of elements
|
|
13739
|
-
*/ makeGroup() {
|
|
13740
|
-
return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit
|
|
13857
|
+
*/ makeGroup(role) {
|
|
13858
|
+
return new _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup(this.jodit, [], role ? {
|
|
13859
|
+
role
|
|
13860
|
+
} : undefined);
|
|
13741
13861
|
}
|
|
13742
13862
|
/**
|
|
13743
13863
|
* All buttons from list
|
|
@@ -13757,7 +13877,7 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup
|
|
|
13757
13877
|
items = (0,_helpers_array_split_array_js__WEBPACK_IMPORTED_MODULE_4__.splitArray)(items);
|
|
13758
13878
|
this.clear();
|
|
13759
13879
|
let lastBtnSeparator = false;
|
|
13760
|
-
let line = this.makeGroup();
|
|
13880
|
+
let line = this.makeGroup('group');
|
|
13761
13881
|
this.append(line);
|
|
13762
13882
|
line.setMod('line', true);
|
|
13763
13883
|
let group;
|
|
@@ -13765,7 +13885,7 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_6__.UIGroup
|
|
|
13765
13885
|
let elm = null;
|
|
13766
13886
|
switch(control.name){
|
|
13767
13887
|
case '\n':
|
|
13768
|
-
line = this.makeGroup();
|
|
13888
|
+
line = this.makeGroup('group');
|
|
13769
13889
|
line.setMod('line', true);
|
|
13770
13890
|
group = this.makeGroup();
|
|
13771
13891
|
line.append(group);
|
|
@@ -21026,6 +21146,7 @@ let ToolbarEditorCollection = class ToolbarEditorCollection extends _collection_
|
|
|
21026
21146
|
* @see https://github.com/jodit/jodit-react/issues/138
|
|
21027
21147
|
*/ prependInvisibleInput(container) {
|
|
21028
21148
|
const input = this.j.create.element('input', {
|
|
21149
|
+
name: 'jodit-toolbar-focus-helper_' + this.j.id,
|
|
21029
21150
|
tabIndex: -1,
|
|
21030
21151
|
disabled: true,
|
|
21031
21152
|
style: 'width: 0; height:0; position: absolute; visibility: hidden;'
|
|
@@ -25893,9 +26014,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.toolbarStickyOffset = 0
|
|
|
25893
26014
|
/* harmony import */ var _decorators_derive_derive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55153);
|
|
25894
26015
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
25895
26016
|
/* harmony import */ var _helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(70799);
|
|
25896
|
-
/* harmony import */ var
|
|
25897
|
-
/* harmony import */ var
|
|
25898
|
-
/* harmony import */ var
|
|
26017
|
+
/* harmony import */ var _helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29960);
|
|
26018
|
+
/* harmony import */ var _traits_elms_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14316);
|
|
26019
|
+
/* harmony import */ var _traits_mods_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34176);
|
|
26020
|
+
/* harmony import */ var _icon_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12153);
|
|
25899
26021
|
/*!
|
|
25900
26022
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
25901
26023
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -25914,7 +26036,12 @@ var UIElement_1;
|
|
|
25914
26036
|
|
|
25915
26037
|
|
|
25916
26038
|
|
|
26039
|
+
|
|
25917
26040
|
let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent {
|
|
26041
|
+
getRole() {
|
|
26042
|
+
var _a;
|
|
26043
|
+
return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || '';
|
|
26044
|
+
}
|
|
25918
26045
|
get parentElement() {
|
|
25919
26046
|
return this.__parentElement;
|
|
25920
26047
|
}
|
|
@@ -26003,19 +26130,22 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
26003
26130
|
return result;
|
|
26004
26131
|
}
|
|
26005
26132
|
parseTemplate(result) {
|
|
26006
|
-
return this.j.c.fromHTML(result.replace(/\*([^*]+?)\*/g, (_, name)=>
|
|
26133
|
+
return this.j.c.fromHTML(result.replace(/\*([^*]+?)\*/g, (_, name)=>_icon_js__WEBPACK_IMPORTED_MODULE_7__.Icon.get(name) || '').replace(/&_/g, this.componentName + '_').replace(/~([^~]+?)~/g, (_, s)=>this.i18n(s)));
|
|
26007
26134
|
}
|
|
26008
26135
|
/** @override */ destruct() {
|
|
26009
26136
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(this.container);
|
|
26010
26137
|
this.parentElement = null;
|
|
26011
26138
|
return super.destruct();
|
|
26012
26139
|
}
|
|
26013
|
-
|
|
26140
|
+
constructor(jodit, options){
|
|
26014
26141
|
super(jodit);
|
|
26015
26142
|
this.name = '';
|
|
26016
26143
|
this.__parentElement = null;
|
|
26017
26144
|
this.mods = {};
|
|
26145
|
+
this.options = options;
|
|
26018
26146
|
this.container = this.createContainer(options);
|
|
26147
|
+
const role = this.getRole();
|
|
26148
|
+
role && (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'role', role);
|
|
26019
26149
|
Object.defineProperty(this.container, 'component', {
|
|
26020
26150
|
value: this,
|
|
26021
26151
|
configurable: true
|
|
@@ -26023,7 +26153,7 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
26023
26153
|
}
|
|
26024
26154
|
};
|
|
26025
26155
|
UIElement = UIElement_1 = __decorate([
|
|
26026
|
-
(0,_decorators_derive_derive_js__WEBPACK_IMPORTED_MODULE_1__.derive)(
|
|
26156
|
+
(0,_decorators_derive_derive_js__WEBPACK_IMPORTED_MODULE_1__.derive)(_traits_mods_js__WEBPACK_IMPORTED_MODULE_6__.Mods, _traits_elms_js__WEBPACK_IMPORTED_MODULE_5__.Elms)
|
|
26027
26157
|
], UIElement);
|
|
26028
26158
|
|
|
26029
26159
|
|
|
@@ -33533,6 +33663,10 @@ let UIGroup = UIGroup_1 = class UIGroup extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
33533
33663
|
className() {
|
|
33534
33664
|
return 'UIGroup';
|
|
33535
33665
|
}
|
|
33666
|
+
getRole() {
|
|
33667
|
+
var _a;
|
|
33668
|
+
return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.role) || 'list';
|
|
33669
|
+
}
|
|
33536
33670
|
/**
|
|
33537
33671
|
* All group children
|
|
33538
33672
|
*/ get allChildren() {
|
|
@@ -41472,6 +41606,16 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
41472
41606
|
className() {
|
|
41473
41607
|
return 'ToolbarButton';
|
|
41474
41608
|
}
|
|
41609
|
+
getRole() {
|
|
41610
|
+
return 'listitem';
|
|
41611
|
+
}
|
|
41612
|
+
updateAriaLabel() {
|
|
41613
|
+
super.updateAriaLabel();
|
|
41614
|
+
if (this.trigger) {
|
|
41615
|
+
const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
|
|
41616
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_14__.attr)(this.trigger, 'aria-label', i8nTooltip);
|
|
41617
|
+
}
|
|
41618
|
+
}
|
|
41475
41619
|
/**
|
|
41476
41620
|
* Get parent toolbar
|
|
41477
41621
|
*/ get toolbar() {
|
|
@@ -41539,14 +41683,13 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
41539
41683
|
const cn = this.componentName;
|
|
41540
41684
|
const container = this.j.c.span(cn);
|
|
41541
41685
|
const button = super.createContainer();
|
|
41542
|
-
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_14__.attr)(container, 'role', 'listitem');
|
|
41543
41686
|
button.classList.remove(cn);
|
|
41544
41687
|
button.classList.add(cn + '__button');
|
|
41545
41688
|
Object.defineProperty(button, 'component', {
|
|
41546
41689
|
value: this
|
|
41547
41690
|
});
|
|
41548
41691
|
container.appendChild(button);
|
|
41549
|
-
const trigger = this.j.c.fromHTML(`<span role="
|
|
41692
|
+
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${_core_ui_icon_js__WEBPACK_IMPORTED_MODULE_18__.Icon.get('chevron')}</span>`);
|
|
41550
41693
|
// For caching
|
|
41551
41694
|
button.appendChild(trigger);
|
|
41552
41695
|
return container;
|
|
@@ -41605,6 +41748,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
41605
41748
|
return;
|
|
41606
41749
|
}
|
|
41607
41750
|
const { control: ctr } = this;
|
|
41751
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_14__.attr)(this.trigger, 'aria-expanded', true);
|
|
41608
41752
|
e.buffer = {
|
|
41609
41753
|
actionTrigger: this
|
|
41610
41754
|
};
|
|
@@ -41714,6 +41858,9 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
41714
41858
|
this.openedPopup.close();
|
|
41715
41859
|
this.openedPopup.destruct();
|
|
41716
41860
|
this.openedPopup = null;
|
|
41861
|
+
if (this.trigger) {
|
|
41862
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_14__.attr)(this.trigger, 'aria-expanded', false);
|
|
41863
|
+
}
|
|
41717
41864
|
}
|
|
41718
41865
|
}
|
|
41719
41866
|
/**
|
|
@@ -44526,13 +44673,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.maxWidth = '100%';
|
|
|
44526
44673
|
/**
|
|
44527
44674
|
* Editor's min-height
|
|
44528
44675
|
*
|
|
44529
|
-
* @example
|
|
44530
44676
|
* ```javascript
|
|
44531
44677
|
* Jodit.make('.editor', {
|
|
44532
44678
|
* minHeight: '30%' //min-height: 30%
|
|
44533
44679
|
* })
|
|
44534
44680
|
* ```
|
|
44535
|
-
*
|
|
44681
|
+
*
|
|
44536
44682
|
* ```javascript
|
|
44537
44683
|
* Jodit.make('.editor', {
|
|
44538
44684
|
* minHeight: 200 //min-height: 200px
|
|
@@ -45590,7 +45736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45590
45736
|
* ```
|
|
45591
45737
|
* @packageDocumentation
|
|
45592
45738
|
* @module constants
|
|
45593
|
-
*/ const APP_VERSION = "4.9.
|
|
45739
|
+
*/ const APP_VERSION = "4.9.25";
|
|
45594
45740
|
// prettier-ignore
|
|
45595
45741
|
const ES = "es2015";
|
|
45596
45742
|
const IS_ES_MODERN = true;
|
|
@@ -46241,11 +46387,13 @@ ToolbarSelect = __decorate([
|
|
|
46241
46387
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
46242
46388
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
46243
46389
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
46244
|
-
/* harmony import */ var
|
|
46245
|
-
/* harmony import */ var
|
|
46246
|
-
/* harmony import */ var
|
|
46247
|
-
/* harmony import */ var
|
|
46248
|
-
/* harmony import */ var
|
|
46390
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49055);
|
|
46391
|
+
/* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29960);
|
|
46392
|
+
/* harmony import */ var _core_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76078);
|
|
46393
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
|
|
46394
|
+
/* harmony import */ var _modules_context_menu_context_menu_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80870);
|
|
46395
|
+
/* harmony import */ var _modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21491);
|
|
46396
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(86012);
|
|
46249
46397
|
function _define_property(obj, key, value) {
|
|
46250
46398
|
if (key in obj) {
|
|
46251
46399
|
Object.defineProperty(obj, key, {
|
|
@@ -46286,12 +46434,15 @@ function _object_spread(target) {
|
|
|
46286
46434
|
|
|
46287
46435
|
|
|
46288
46436
|
|
|
46437
|
+
|
|
46438
|
+
|
|
46289
46439
|
/**
|
|
46290
46440
|
* Show a path to a current element in status bar
|
|
46291
|
-
*/ class xpath extends
|
|
46441
|
+
*/ class xpath extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin {
|
|
46292
46442
|
afterInit() {
|
|
46293
46443
|
if (this.j.o.showXPathInStatusbar) {
|
|
46294
46444
|
this.container = this.j.c.div('jodit-xpath');
|
|
46445
|
+
(0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'role', 'list');
|
|
46295
46446
|
const init = ()=>{
|
|
46296
46447
|
if (!this.j.o.showXPathInStatusbar || !this.container) {
|
|
46297
46448
|
return;
|
|
@@ -46306,7 +46457,7 @@ function _object_spread(target) {
|
|
|
46306
46457
|
this.appendSelectAll();
|
|
46307
46458
|
}
|
|
46308
46459
|
};
|
|
46309
|
-
this.j.e.off('.xpath').on('
|
|
46460
|
+
this.j.e.off('.xpath').on('pointerup.xpath change.xpath keydown.xpath changeSelection.xpath', this.calcPath).on('afterSetMode.xpath afterInit.xpath changePlace.xpath', init);
|
|
46310
46461
|
init();
|
|
46311
46462
|
this.calcPath();
|
|
46312
46463
|
}
|
|
@@ -46325,7 +46476,7 @@ function _object_spread(target) {
|
|
|
46325
46476
|
super(...arguments);
|
|
46326
46477
|
this.onContext = (bindElement, event)=>{
|
|
46327
46478
|
if (!this.menu) {
|
|
46328
|
-
this.menu = new
|
|
46479
|
+
this.menu = new _modules_context_menu_context_menu_js__WEBPACK_IMPORTED_MODULE_7__.ContextMenu(this.j);
|
|
46329
46480
|
}
|
|
46330
46481
|
this.menu.show(event.clientX, event.clientY, [
|
|
46331
46482
|
{
|
|
@@ -46352,7 +46503,7 @@ function _object_spread(target) {
|
|
|
46352
46503
|
};
|
|
46353
46504
|
this.onSelectPath = (bindElement, event)=>{
|
|
46354
46505
|
this.j.s.focus();
|
|
46355
|
-
const path = (0,
|
|
46506
|
+
const path = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_4__.attr)(event.target, '-path') || '/';
|
|
46356
46507
|
if (path === '/') {
|
|
46357
46508
|
this.j.execCommand('selectall');
|
|
46358
46509
|
return false;
|
|
@@ -46368,7 +46519,7 @@ function _object_spread(target) {
|
|
|
46368
46519
|
return false;
|
|
46369
46520
|
};
|
|
46370
46521
|
this.tpl = (bindElement, path, name, title)=>{
|
|
46371
|
-
const item = this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${path}" title="${title}" tabindex="-1"'>${(0,
|
|
46522
|
+
const item = this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${path}" title="${title}" tabindex="-1"'>${(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__.trim)(name)}</a></span>`);
|
|
46372
46523
|
const a = item.firstChild;
|
|
46373
46524
|
this.j.e.on(a, 'click', this.onSelectPath.bind(this, bindElement)).on(a, 'contextmenu', this.onContext.bind(this, bindElement));
|
|
46374
46525
|
return item;
|
|
@@ -46381,7 +46532,7 @@ function _object_spread(target) {
|
|
|
46381
46532
|
};
|
|
46382
46533
|
this.appendSelectAll = ()=>{
|
|
46383
46534
|
this.removeSelectAll();
|
|
46384
|
-
this.selectAllButton = (0,
|
|
46535
|
+
this.selectAllButton = (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_8__.makeButton)(this.j, _object_spread({
|
|
46385
46536
|
name: 'selectall'
|
|
46386
46537
|
}, this.j.o.controls.selectall));
|
|
46387
46538
|
this.selectAllButton.state.size = 'tiny';
|
|
@@ -46400,7 +46551,7 @@ function _object_spread(target) {
|
|
|
46400
46551
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.up(current, (elm)=>{
|
|
46401
46552
|
if (elm && this.j.editor !== elm && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(elm) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isComment(elm)) {
|
|
46402
46553
|
name = elm.nodeName.toLowerCase();
|
|
46403
|
-
xpth = (0,
|
|
46554
|
+
xpth = (0,_core_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_5__.getXPathByElement)(elm, this.j.editor).replace(/^\//, '');
|
|
46404
46555
|
li = this.tpl(elm, xpth, name, this.j.i18n('Select %s', name));
|
|
46405
46556
|
this.container && this.container.insertBefore(li, this.container.firstChild);
|
|
46406
46557
|
}
|