jodit-pro 4.19.9 → 4.19.10
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +11 -11
- package/es2015/jodit.js +699 -163
- package/es2015/jodit.min.js +41 -41
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2015/plugins/chart/chart.js +1 -1
- package/es2015/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2015/plugins/math/math.js +1 -1
- package/es2015/plugins/math/math.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/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.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 +11 -11
- package/es2018/jodit.min.js +14 -14
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- 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/chart/chart.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/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.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/templates/templates.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 +15 -15
- package/es2021/jodit.js +699 -163
- package/es2021/jodit.min.js +33 -33
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.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/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.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 +13 -13
- package/es2021.en/jodit.js +699 -163
- package/es2021.en/jodit.min.js +14 -14
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.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/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.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 +771 -168
- 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 +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.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/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.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/package.json +1 -1
package/es2021.en/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.19.
|
|
4
|
+
* Version: v4.19.10
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1768,7 +1768,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1768
1768
|
* ```
|
|
1769
1769
|
* @packageDocumentation
|
|
1770
1770
|
* @module constants
|
|
1771
|
-
*/ const APP_VERSION = "4.19.
|
|
1771
|
+
*/ const APP_VERSION = "4.19.10";
|
|
1772
1772
|
// prettier-ignore
|
|
1773
1773
|
const ES = "es2021";
|
|
1774
1774
|
const IS_ES_MODERN = true;
|
|
@@ -2977,13 +2977,14 @@ function wait(condition) {
|
|
|
2977
2977
|
/* harmony import */ var _helpers_checker_is_set_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42320);
|
|
2978
2978
|
/* harmony import */ var _helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70799);
|
|
2979
2979
|
/* harmony import */ var _helpers_checker_is_void_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86068);
|
|
2980
|
-
/* harmony import */ var
|
|
2981
|
-
/* harmony import */ var
|
|
2982
|
-
/* harmony import */ var
|
|
2983
|
-
/* harmony import */ var
|
|
2984
|
-
/* harmony import */ var
|
|
2985
|
-
/* harmony import */ var
|
|
2986
|
-
/* harmony import */ var
|
|
2980
|
+
/* harmony import */ var _helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76241);
|
|
2981
|
+
/* harmony import */ var _helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49055);
|
|
2982
|
+
/* harmony import */ var _helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(38837);
|
|
2983
|
+
/* harmony import */ var _helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(29960);
|
|
2984
|
+
/* harmony import */ var _helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(41180);
|
|
2985
|
+
/* harmony import */ var _helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(86583);
|
|
2986
|
+
/* harmony import */ var _helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(89890);
|
|
2987
|
+
/* harmony import */ var _helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(37790);
|
|
2987
2988
|
/*!
|
|
2988
2989
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
2989
2990
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -3004,7 +3005,7 @@ function wait(condition) {
|
|
|
3004
3005
|
|
|
3005
3006
|
|
|
3006
3007
|
|
|
3007
|
-
|
|
3008
|
+
|
|
3008
3009
|
/**
|
|
3009
3010
|
* Module for working with DOM
|
|
3010
3011
|
*/ class Dom {
|
|
@@ -3082,7 +3083,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3082
3083
|
const wrapper = (0,_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_6__.isString)(tag) ? create.element(tag) : tag;
|
|
3083
3084
|
if (Dom.isNode(current)) {
|
|
3084
3085
|
if (!current.parentNode) {
|
|
3085
|
-
throw (0,
|
|
3086
|
+
throw (0,_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_14__.error)('Element should be in DOM');
|
|
3086
3087
|
}
|
|
3087
3088
|
current.parentNode.insertBefore(wrapper, current);
|
|
3088
3089
|
wrapper.appendChild(current);
|
|
@@ -3132,12 +3133,12 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3132
3133
|
}
|
|
3133
3134
|
static replace(elm, newTagName, create, withAttributes = false, notMoveContent = false) {
|
|
3134
3135
|
if ((0,_helpers_checker_is_html_js__WEBPACK_IMPORTED_MODULE_4__.isHTML)(newTagName)) {
|
|
3135
|
-
(0,
|
|
3136
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_10__.assert)(create, 'Need create instance for new tag');
|
|
3136
3137
|
newTagName = create.fromHTML(newTagName);
|
|
3137
3138
|
}
|
|
3138
3139
|
let tag;
|
|
3139
3140
|
if ((0,_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_6__.isString)(newTagName)) {
|
|
3140
|
-
(0,
|
|
3141
|
+
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_10__.assert)(create, 'Need create instance for new tag');
|
|
3141
3142
|
tag = create.element(newTagName);
|
|
3142
3143
|
} else {
|
|
3143
3144
|
tag = newTagName;
|
|
@@ -3186,7 +3187,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3186
3187
|
} else {
|
|
3187
3188
|
cond = condNoEmptyElement;
|
|
3188
3189
|
}
|
|
3189
|
-
const emptyText = (node)=>node.nodeValue == null || (0,
|
|
3190
|
+
const emptyText = (node)=>node.nodeValue == null || (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_9__.trim)(node.nodeValue).length === 0;
|
|
3190
3191
|
if (Dom.isText(node)) {
|
|
3191
3192
|
return emptyText(node);
|
|
3192
3193
|
}
|
|
@@ -3277,7 +3278,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3277
3278
|
return Dom.isElement(node) && !/^(BR|HR)$/i.test(node.tagName) && [
|
|
3278
3279
|
'inline',
|
|
3279
3280
|
'inline-block'
|
|
3280
|
-
].indexOf((0,
|
|
3281
|
+
].indexOf((0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_12__.css)(node, 'display').toString()) !== -1;
|
|
3281
3282
|
}
|
|
3282
3283
|
/**
|
|
3283
3284
|
* It's block and it can be split
|
|
@@ -3452,13 +3453,13 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3452
3453
|
*/ static findNotEmptySibling(node, left) {
|
|
3453
3454
|
return Dom.findSibling(node, left, (n)=>{
|
|
3454
3455
|
var _a;
|
|
3455
|
-
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.length) && (0,
|
|
3456
|
+
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.length) && (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_9__.trim)(n.nodeValue));
|
|
3456
3457
|
});
|
|
3457
3458
|
}
|
|
3458
3459
|
/**
|
|
3459
3460
|
* Returns the nearest non-empty neighbor
|
|
3460
3461
|
*/ static findNotEmptyNeighbor(node, left, root) {
|
|
3461
|
-
return (0,
|
|
3462
|
+
return (0,_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_15__.call)(left ? Dom.prev : Dom.next, node, (n)=>Boolean(n && (!(Dom.isText(n) || Dom.isComment(n)) || (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_9__.trim)((n === null || n === void 0 ? void 0 : n.nodeValue) || '').length)), root);
|
|
3462
3463
|
}
|
|
3463
3464
|
static sibling(node, left) {
|
|
3464
3465
|
return left ? node.previousSibling : node.nextSibling;
|
|
@@ -3605,7 +3606,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3605
3606
|
if (!node) {
|
|
3606
3607
|
return;
|
|
3607
3608
|
}
|
|
3608
|
-
;(0,
|
|
3609
|
+
;(0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_13__.dataBind)(node, '__old_display', node.style.getPropertyValue('display'));
|
|
3609
3610
|
node.style.setProperty('display', 'none');
|
|
3610
3611
|
}
|
|
3611
3612
|
/**
|
|
@@ -3614,7 +3615,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3614
3615
|
if (!node) {
|
|
3615
3616
|
return;
|
|
3616
3617
|
}
|
|
3617
|
-
const display = (0,
|
|
3618
|
+
const display = (0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_13__.dataBind)(node, '__old_display');
|
|
3618
3619
|
if (node.style.getPropertyValue('display') === 'none') {
|
|
3619
3620
|
node.style.setProperty('display', display || null);
|
|
3620
3621
|
}
|
|
@@ -3635,8 +3636,8 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3635
3636
|
/**
|
|
3636
3637
|
* Marks an item as temporary
|
|
3637
3638
|
*/ static markTemporary(element, attributes) {
|
|
3638
|
-
attributes && (0,
|
|
3639
|
-
(0,
|
|
3639
|
+
attributes && (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_11__.attr)(element, attributes);
|
|
3640
|
+
(0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_11__.attr)(element, _constants_js__WEBPACK_IMPORTED_MODULE_0__.TEMP_ATTR, true);
|
|
3640
3641
|
return element;
|
|
3641
3642
|
}
|
|
3642
3643
|
/**
|
|
@@ -3645,7 +3646,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3645
3646
|
if (!Dom.isElement(element)) {
|
|
3646
3647
|
return false;
|
|
3647
3648
|
}
|
|
3648
|
-
return Dom.isMarker(element) || (0,
|
|
3649
|
+
return Dom.isMarker(element) || (0,_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_11__.attr)(element, _constants_js__WEBPACK_IMPORTED_MODULE_0__.TEMP_ATTR) === 'true';
|
|
3649
3650
|
}
|
|
3650
3651
|
/**
|
|
3651
3652
|
* Define element is selection helper
|
|
@@ -3655,7 +3656,7 @@ const TEMP_ELEMENT_REG_EXP = new RegExp(`<([a-z]+)[^>]+${_constants_js__WEBPACK_
|
|
|
3655
3656
|
/**
|
|
3656
3657
|
* Unwrap temporary elements inside a HTML string (keeps their content)
|
|
3657
3658
|
*/ static replaceTemporaryFromString(value) {
|
|
3658
|
-
return
|
|
3659
|
+
return (0,_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_8__.unwrapMarkedTags)(value, null, _constants_js__WEBPACK_IMPORTED_MODULE_0__.TEMP_ATTR);
|
|
3659
3660
|
}
|
|
3660
3661
|
/**
|
|
3661
3662
|
* Collect the temporary elements (`data-jodit-temp`) inside the root.
|
|
@@ -5186,16 +5187,96 @@ function isFastEqual(a, b) {
|
|
|
5186
5187
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5187
5188
|
*/ /**
|
|
5188
5189
|
* @module helpers/checker
|
|
5189
|
-
*/
|
|
5190
|
+
*/ const SPACE = /\s/;
|
|
5191
|
+
const DIGIT = /\d/;
|
|
5192
|
+
const WORD_CHAR = /\w/;
|
|
5193
|
+
// `content="Microsoft Word 15"` — the name followed by a space and a version digit
|
|
5194
|
+
function hasGenerator(tag, name) {
|
|
5195
|
+
let index = tag.indexOf(name);
|
|
5196
|
+
while(index !== -1){
|
|
5197
|
+
const after = index + name.length;
|
|
5198
|
+
if (SPACE.test(tag.charAt(after)) && DIGIT.test(tag.charAt(after + 1))) {
|
|
5199
|
+
return true;
|
|
5200
|
+
}
|
|
5201
|
+
index = tag.indexOf(name, after);
|
|
5202
|
+
}
|
|
5203
|
+
return false;
|
|
5204
|
+
}
|
|
5205
|
+
// `<meta name=ProgId content=Word.Document>`, `<meta name=Generator content="LibreOffice 7.6">`
|
|
5206
|
+
function isOfficeMeta(tag) {
|
|
5207
|
+
if (hasGenerator(tag, 'Microsoft Word') || hasGenerator(tag, 'Microsoft Excel')) {
|
|
5208
|
+
return true;
|
|
5209
|
+
}
|
|
5210
|
+
const lower = tag.toLowerCase();
|
|
5211
|
+
const progId = lower.indexOf('progid');
|
|
5212
|
+
if (progId !== -1 && (lower.indexOf('word.', progId) !== -1 || lower.indexOf('excel.', progId) !== -1)) {
|
|
5213
|
+
return true;
|
|
5214
|
+
}
|
|
5215
|
+
return lower.includes('libreoffice') || lower.includes('openoffice');
|
|
5216
|
+
}
|
|
5217
|
+
// ` class=MsoNormal`, ` class="MsoListParagraph"` inside one tag
|
|
5218
|
+
function hasMsoClass(tag) {
|
|
5219
|
+
let index = tag.indexOf('class=');
|
|
5220
|
+
while(index !== -1){
|
|
5221
|
+
if (index > 0 && SPACE.test(tag.charAt(index - 1))) {
|
|
5222
|
+
let value = index + 'class='.length;
|
|
5223
|
+
const quote = tag.charAt(value);
|
|
5224
|
+
if (quote === '"' || quote === "'") {
|
|
5225
|
+
value += 1;
|
|
5226
|
+
}
|
|
5227
|
+
if (tag.startsWith('Mso', value)) {
|
|
5228
|
+
return true;
|
|
5229
|
+
}
|
|
5230
|
+
}
|
|
5231
|
+
index = tag.indexOf('class=', index + 'class='.length);
|
|
5232
|
+
}
|
|
5233
|
+
return false;
|
|
5234
|
+
}
|
|
5235
|
+
// `style='mso-list:l0 level1 lfo1'` — an `mso-` property inside a style attribute with the given quote
|
|
5236
|
+
function hasMsoStyle(data, quote) {
|
|
5237
|
+
const open = 'style=' + quote;
|
|
5238
|
+
let index = data.indexOf(open);
|
|
5239
|
+
while(index !== -1){
|
|
5240
|
+
const start = index + open.length;
|
|
5241
|
+
let end = data.indexOf(quote, start);
|
|
5242
|
+
if (end === -1) {
|
|
5243
|
+
end = data.length;
|
|
5244
|
+
}
|
|
5245
|
+
if (data.slice(start, end).includes('mso-')) {
|
|
5246
|
+
return true;
|
|
5247
|
+
}
|
|
5248
|
+
index = data.indexOf(open, end);
|
|
5249
|
+
}
|
|
5250
|
+
return false;
|
|
5251
|
+
}
|
|
5252
|
+
/**
|
|
5190
5253
|
* Detect if string is HTML from MS Word, Excel or LibreOffice/OpenOffice
|
|
5254
|
+
*
|
|
5255
|
+
* The clipboard text is attacker controlled, so every check walks the string
|
|
5256
|
+
* once with `indexOf`: a regex with an unbounded group before a required
|
|
5257
|
+
* literal was quadratic on a long run of `<meta` and froze the tab.
|
|
5191
5258
|
*/ function isHtmlFromWord(data) {
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5259
|
+
if (data.includes('urn:schemas-microsoft-com:office:word') || data.includes('urn:schemas-microsoft-com:office:excel')) {
|
|
5260
|
+
return true;
|
|
5261
|
+
}
|
|
5262
|
+
// Each tag is taken once, from its `<` to the next `>`, so the scan stays linear
|
|
5263
|
+
let index = data.indexOf('<');
|
|
5264
|
+
while(index !== -1){
|
|
5265
|
+
if (!WORD_CHAR.test(data.charAt(index + 1))) {
|
|
5266
|
+
index = data.indexOf('<', index + 1);
|
|
5267
|
+
continue;
|
|
5268
|
+
}
|
|
5269
|
+
let end = data.indexOf('>', index);
|
|
5270
|
+
if (end === -1) {
|
|
5271
|
+
end = data.length;
|
|
5272
|
+
}
|
|
5273
|
+
const tag = data.slice(index, end);
|
|
5274
|
+
if (tag.slice(0, 5).toLowerCase() === '<meta' && isOfficeMeta(tag) || hasMsoClass(tag)) {
|
|
5275
|
+
return true;
|
|
5276
|
+
}
|
|
5277
|
+
index = data.indexOf('<', end);
|
|
5278
|
+
}
|
|
5279
|
+
return hasMsoStyle(data, "'") || hasMsoStyle(data, '"') && data.includes('<font');
|
|
5199
5280
|
}
|
|
5200
5281
|
|
|
5201
5282
|
|
|
@@ -5212,9 +5293,62 @@ function isFastEqual(a, b) {
|
|
|
5212
5293
|
*/ /**
|
|
5213
5294
|
* @module helpers/checker
|
|
5214
5295
|
*/
|
|
5296
|
+
const NAME_START = /[A-Za-z]/;
|
|
5297
|
+
const NAME_CHAR = /[A-Za-z0-9]/;
|
|
5298
|
+
const WORD_CHAR = /\w/;
|
|
5299
|
+
// The tag name at `from`, or '' when there is none
|
|
5300
|
+
function readTagName(str, from) {
|
|
5301
|
+
if (!NAME_START.test(str.charAt(from))) {
|
|
5302
|
+
return '';
|
|
5303
|
+
}
|
|
5304
|
+
let end = from + 1;
|
|
5305
|
+
while(NAME_CHAR.test(str.charAt(end))){
|
|
5306
|
+
end += 1;
|
|
5307
|
+
}
|
|
5308
|
+
return str.slice(from, end);
|
|
5309
|
+
}
|
|
5310
|
+
// Is there an element `<name ...>` closed later by `</name>`? One pass for the closing tags, one for the opening ones
|
|
5311
|
+
function hasElement(str) {
|
|
5312
|
+
const lastClose = new Map();
|
|
5313
|
+
let index = str.indexOf('</');
|
|
5314
|
+
while(index !== -1){
|
|
5315
|
+
const name = readTagName(str, index + 2);
|
|
5316
|
+
if (name !== '' && str.charAt(index + 2 + name.length) === '>') {
|
|
5317
|
+
lastClose.set(name, index);
|
|
5318
|
+
}
|
|
5319
|
+
index = str.indexOf('</', index + 2);
|
|
5320
|
+
}
|
|
5321
|
+
if (lastClose.size === 0) {
|
|
5322
|
+
return false;
|
|
5323
|
+
}
|
|
5324
|
+
let gt = -1;
|
|
5325
|
+
index = str.indexOf('<');
|
|
5326
|
+
while(index !== -1){
|
|
5327
|
+
const name = readTagName(str, index + 1);
|
|
5328
|
+
const after = index + 1 + name.length;
|
|
5329
|
+
if (name !== '' && !WORD_CHAR.test(str.charAt(after))) {
|
|
5330
|
+
if (gt < after) {
|
|
5331
|
+
gt = str.indexOf('>', after);
|
|
5332
|
+
}
|
|
5333
|
+
if (gt === -1) {
|
|
5334
|
+
return false;
|
|
5335
|
+
}
|
|
5336
|
+
const close = lastClose.get(name);
|
|
5337
|
+
if (close !== undefined && close > gt) {
|
|
5338
|
+
return true;
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
index = str.indexOf('<', index + 1);
|
|
5342
|
+
}
|
|
5343
|
+
return false;
|
|
5344
|
+
}
|
|
5215
5345
|
/**
|
|
5216
5346
|
* Check if a string is html or not
|
|
5217
|
-
|
|
5347
|
+
*
|
|
5348
|
+
* The pasted text is attacker controlled, so the check walks the string with
|
|
5349
|
+
* `indexOf`: the former regex `<(\w+)[^>]*>(.*?)<\/\1>` was quadratic on a
|
|
5350
|
+
* long run of `<a>` and froze the tab.
|
|
5351
|
+
*/ const isHTML = (str)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isString)(str) && hasElement(str);
|
|
5218
5352
|
|
|
5219
5353
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
|
5220
5354
|
/* harmony export */ "isHTML", 0, /* binding */ isHTML
|
|
@@ -5704,11 +5838,12 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5704
5838
|
/* harmony export */ });
|
|
5705
5839
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5706
5840
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5707
|
-
/* harmony import */ var
|
|
5708
|
-
/* harmony import */ var
|
|
5709
|
-
/* harmony import */ var
|
|
5710
|
-
/* harmony import */ var
|
|
5711
|
-
/* harmony import */ var
|
|
5841
|
+
/* harmony import */ var _tag_scan_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76241);
|
|
5842
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90723);
|
|
5843
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
5844
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
5845
|
+
/* harmony import */ var _utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
5846
|
+
/* harmony import */ var _utils_selector_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76078);
|
|
5712
5847
|
/*!
|
|
5713
5848
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5714
5849
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5722,8 +5857,19 @@ const isLicense = (license)=>(0,_is_string_js__WEBPACK_IMPORTED_MODULE_0__.isStr
|
|
|
5722
5857
|
|
|
5723
5858
|
|
|
5724
5859
|
|
|
5860
|
+
|
|
5861
|
+
// Drop the `mso-*` and `border*` declarations and turn pt/cm into px; one declaration at a time, so a long value cannot make the regexes backtrack
|
|
5725
5862
|
function normalizeCSS(s) {
|
|
5726
|
-
|
|
5863
|
+
const declarations = s.split(';');
|
|
5864
|
+
const last = declarations.length - 1;
|
|
5865
|
+
return declarations.filter((declaration, index)=>{
|
|
5866
|
+
const match = /^\s*([a-z-]{1,64})\s*:/i.exec(declaration);
|
|
5867
|
+
if (!match) {
|
|
5868
|
+
return true;
|
|
5869
|
+
}
|
|
5870
|
+
const property = match[1].toLowerCase();
|
|
5871
|
+
return !(property.startsWith('mso-') || property.startsWith('border') && index !== last);
|
|
5872
|
+
}).join(';').replace(/([0-9.]{1,32})(pt|cm)/gi, (match, units, metrics)=>{
|
|
5727
5873
|
switch(metrics.toLowerCase()){
|
|
5728
5874
|
case 'pt':
|
|
5729
5875
|
return (parseFloat(units) * 1.328).toFixed(0) + 'px';
|
|
@@ -5745,17 +5891,17 @@ function normalizeCSS(s) {
|
|
|
5745
5891
|
// cell backgrounds/borders, e.g. `.xl31 { background:#FCE4D6 }`) were never
|
|
5746
5892
|
// inlined and all styling was lost once the `<style>` block got stripped.
|
|
5747
5893
|
// See https://github.com/xdan/jodit/issues/1362
|
|
5748
|
-
const
|
|
5749
|
-
if (
|
|
5894
|
+
const open = (0,_tag_scan_js__WEBPACK_IMPORTED_MODULE_2__.indexOfOpenTag)(html, 'html');
|
|
5895
|
+
if (open === -1) {
|
|
5750
5896
|
return html;
|
|
5751
5897
|
}
|
|
5752
|
-
html = html.substring(
|
|
5898
|
+
html = html.substring(open);
|
|
5753
5899
|
const closeIndex = html.toLowerCase().lastIndexOf('</html>');
|
|
5754
5900
|
if (closeIndex !== -1) {
|
|
5755
5901
|
html = html.substring(0, closeIndex + '</html>'.length);
|
|
5756
5902
|
}
|
|
5757
5903
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
5758
|
-
(0,
|
|
5904
|
+
(0,_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(iframe, 'display', 'none');
|
|
5759
5905
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(_constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body, iframe);
|
|
5760
5906
|
let convertedString = '', collection;
|
|
5761
5907
|
try {
|
|
@@ -5764,14 +5910,14 @@ function normalizeCSS(s) {
|
|
|
5764
5910
|
iframeDoc.open();
|
|
5765
5911
|
iframeDoc.write(html);
|
|
5766
5912
|
iframeDoc.close();
|
|
5767
|
-
const listItems = (0,
|
|
5913
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.readWordListItems)(iframeDoc.body);
|
|
5768
5914
|
// Word marks its auto-generated list markers (the literal
|
|
5769
5915
|
// bullet/number, e.g. `1.` or `·`) with `mso-list:Ignore`.
|
|
5770
5916
|
// They are display-only and must not be imported, otherwise
|
|
5771
5917
|
// the marker text leaks into the content. Drop them before any
|
|
5772
5918
|
// style normalization strips the `mso-list` hint. See #948
|
|
5773
5919
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5774
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,
|
|
5920
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && /mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style') || '')) {
|
|
5775
5921
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(node);
|
|
5776
5922
|
}
|
|
5777
5923
|
});
|
|
@@ -5782,7 +5928,7 @@ function normalizeCSS(s) {
|
|
|
5782
5928
|
if (rules[idx].selectorText === '') {
|
|
5783
5929
|
continue;
|
|
5784
5930
|
}
|
|
5785
|
-
collection = (0,
|
|
5931
|
+
collection = (0,_utils_selector_js__WEBPACK_IMPORTED_MODULE_7__.$$)(rules[idx].selectorText, iframeDoc.body);
|
|
5786
5932
|
// `style.cssText` on purpose: the CSSOM parses the text,
|
|
5787
5933
|
// drops invalid declarations and re-serializes it. The raw
|
|
5788
5934
|
// `style` attribute would keep Word-only junk verbatim
|
|
@@ -5796,19 +5942,19 @@ function normalizeCSS(s) {
|
|
|
5796
5942
|
throw e;
|
|
5797
5943
|
}
|
|
5798
5944
|
}
|
|
5799
|
-
;(0,
|
|
5945
|
+
;(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_3__.wrapWordListItems)(listItems);
|
|
5800
5946
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(iframeDoc.body, (node)=>{
|
|
5801
5947
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node)) {
|
|
5802
|
-
const cssText = (0,
|
|
5948
|
+
const cssText = (0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style');
|
|
5803
5949
|
if (cssText) {
|
|
5804
5950
|
node.style.cssText = normalizeCSS(cssText);
|
|
5805
5951
|
}
|
|
5806
|
-
if (!(0,
|
|
5807
|
-
(0,
|
|
5952
|
+
if (!(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style')) {
|
|
5953
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(node, 'style', null);
|
|
5808
5954
|
}
|
|
5809
5955
|
}
|
|
5810
5956
|
});
|
|
5811
|
-
convertedString = iframeDoc.firstChild ? (0,
|
|
5957
|
+
convertedString = iframeDoc.firstChild ? (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim)(iframeDoc.body.innerHTML) : '';
|
|
5812
5958
|
}
|
|
5813
5959
|
} catch (_a) {} finally{
|
|
5814
5960
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(iframe);
|
|
@@ -5816,7 +5962,7 @@ function normalizeCSS(s) {
|
|
|
5816
5962
|
if (convertedString) {
|
|
5817
5963
|
html = convertedString;
|
|
5818
5964
|
}
|
|
5819
|
-
return (0,
|
|
5965
|
+
return (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim)((0,_tag_scan_js__WEBPACK_IMPORTED_MODULE_2__.removeWordWrappers)(html));
|
|
5820
5966
|
}
|
|
5821
5967
|
|
|
5822
5968
|
|
|
@@ -5831,9 +5977,10 @@ function normalizeCSS(s) {
|
|
|
5831
5977
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
5832
5978
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
5833
5979
|
/* harmony import */ var _array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
|
|
5834
|
-
/* harmony import */ var
|
|
5835
|
-
/* harmony import */ var
|
|
5836
|
-
/* harmony import */ var
|
|
5980
|
+
/* harmony import */ var _tag_scan_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76241);
|
|
5981
|
+
/* harmony import */ var _word_lists_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90723);
|
|
5982
|
+
/* harmony import */ var _string_trim_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(49055);
|
|
5983
|
+
/* harmony import */ var _utils_attr_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(29960);
|
|
5837
5984
|
/*!
|
|
5838
5985
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5839
5986
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5846,6 +5993,7 @@ function normalizeCSS(s) {
|
|
|
5846
5993
|
|
|
5847
5994
|
|
|
5848
5995
|
|
|
5996
|
+
|
|
5849
5997
|
/**
|
|
5850
5998
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
5851
5999
|
* content that matches the look and feel of the site.
|
|
@@ -5859,7 +6007,7 @@ function normalizeCSS(s) {
|
|
|
5859
6007
|
const div = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5860
6008
|
div.innerHTML = html;
|
|
5861
6009
|
const marks = [];
|
|
5862
|
-
const listItems = (0,
|
|
6010
|
+
const listItems = (0,_word_lists_js__WEBPACK_IMPORTED_MODULE_4__.readWordListItems)(div);
|
|
5863
6011
|
if (div.firstChild) {
|
|
5864
6012
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.each(div, (node)=>{
|
|
5865
6013
|
if (!node) {
|
|
@@ -5884,7 +6032,7 @@ function normalizeCSS(s) {
|
|
|
5884
6032
|
// with `mso-list:Ignore`. They are display-only
|
|
5885
6033
|
// and must not be imported, otherwise the marker
|
|
5886
6034
|
// text leaks into the content. See #948
|
|
5887
|
-
if (/mso-list:\s*ignore/i.test((0,
|
|
6035
|
+
if (/mso-list:\s*ignore/i.test((0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_6__.attr)(node, 'style') || '')) {
|
|
5888
6036
|
marks.push(node);
|
|
5889
6037
|
break;
|
|
5890
6038
|
}
|
|
@@ -5898,7 +6046,7 @@ function normalizeCSS(s) {
|
|
|
5898
6046
|
// `attrRaw`: SVG keeps camelCase names
|
|
5899
6047
|
// (`viewBox`), `attr()` would kebab-case
|
|
5900
6048
|
// them and silently skip the removal
|
|
5901
|
-
(0,
|
|
6049
|
+
(0,_utils_attr_js__WEBPACK_IMPORTED_MODULE_6__.attrRaw)(node, attribute.name, null);
|
|
5902
6050
|
}
|
|
5903
6051
|
});
|
|
5904
6052
|
}
|
|
@@ -5911,14 +6059,14 @@ function normalizeCSS(s) {
|
|
|
5911
6059
|
});
|
|
5912
6060
|
}
|
|
5913
6061
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove.apply(null, marks);
|
|
5914
|
-
(0,
|
|
6062
|
+
(0,_word_lists_js__WEBPACK_IMPORTED_MODULE_4__.wrapWordListItems)(listItems);
|
|
5915
6063
|
convertedString = div.innerHTML;
|
|
5916
6064
|
} catch (e) {}
|
|
5917
6065
|
if (convertedString) {
|
|
5918
6066
|
html = convertedString;
|
|
5919
6067
|
}
|
|
5920
|
-
html = html.split(/(\n)/).filter(
|
|
5921
|
-
return
|
|
6068
|
+
html = html.split(/(\n)/).filter(_string_trim_js__WEBPACK_IMPORTED_MODULE_5__.trim).join('\n');
|
|
6069
|
+
return (0,_tag_scan_js__WEBPACK_IMPORTED_MODULE_3__.removeWordWrappers)(html);
|
|
5922
6070
|
}
|
|
5923
6071
|
|
|
5924
6072
|
|
|
@@ -5956,10 +6104,17 @@ function normalizeCSS(s) {
|
|
|
5956
6104
|
/* harmony export */ applyStyles: function() { return /* reexport safe */ _apply_styles_js__WEBPACK_IMPORTED_MODULE_0__.applyStyles; },
|
|
5957
6105
|
/* harmony export */ cleanFromWord: function() { return /* reexport safe */ _clean_from_word_js__WEBPACK_IMPORTED_MODULE_1__.cleanFromWord; },
|
|
5958
6106
|
/* harmony export */ htmlspecialchars: function() { return /* reexport safe */ _htmlspecialchars_js__WEBPACK_IMPORTED_MODULE_2__.htmlspecialchars; },
|
|
6107
|
+
/* harmony export */ indexOfClosingTag: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.indexOfClosingTag; },
|
|
6108
|
+
/* harmony export */ indexOfOpenTag: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.indexOfOpenTag; },
|
|
5959
6109
|
/* harmony export */ nl2br: function() { return /* reexport safe */ _nl2br_js__WEBPACK_IMPORTED_MODULE_3__.nl2br; },
|
|
6110
|
+
/* harmony export */ removeBetween: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.removeBetween; },
|
|
6111
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.removeEmptyMarkedTags; },
|
|
6112
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.removeTagsByPrefix; },
|
|
6113
|
+
/* harmony export */ removeWordWrappers: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.removeWordWrappers; },
|
|
5960
6114
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _safe_html_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML; },
|
|
5961
6115
|
/* harmony export */ sanitizeHTMLElement: function() { return /* reexport safe */ _safe_html_js__WEBPACK_IMPORTED_MODULE_4__.sanitizeHTMLElement; },
|
|
5962
|
-
/* harmony export */ stripTags: function() { return /* reexport safe */ _strip_tags_js__WEBPACK_IMPORTED_MODULE_5__.stripTags; }
|
|
6116
|
+
/* harmony export */ stripTags: function() { return /* reexport safe */ _strip_tags_js__WEBPACK_IMPORTED_MODULE_5__.stripTags; },
|
|
6117
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* reexport safe */ _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__.unwrapMarkedTags; }
|
|
5963
6118
|
/* harmony export */ });
|
|
5964
6119
|
/* harmony import */ var _apply_styles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32574);
|
|
5965
6120
|
/* harmony import */ var _clean_from_word_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53212);
|
|
@@ -5967,6 +6122,7 @@ function normalizeCSS(s) {
|
|
|
5967
6122
|
/* harmony import */ var _nl2br_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45971);
|
|
5968
6123
|
/* harmony import */ var _safe_html_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86518);
|
|
5969
6124
|
/* harmony import */ var _strip_tags_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91003);
|
|
6125
|
+
/* harmony import */ var _tag_scan_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76241);
|
|
5970
6126
|
/*!
|
|
5971
6127
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5972
6128
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5981,6 +6137,7 @@ function normalizeCSS(s) {
|
|
|
5981
6137
|
|
|
5982
6138
|
|
|
5983
6139
|
|
|
6140
|
+
|
|
5984
6141
|
/***/ }),
|
|
5985
6142
|
|
|
5986
6143
|
/***/ 45971:
|
|
@@ -6334,6 +6491,281 @@ function restoreTags(content) {
|
|
|
6334
6491
|
}
|
|
6335
6492
|
|
|
6336
6493
|
|
|
6494
|
+
/***/ }),
|
|
6495
|
+
|
|
6496
|
+
/***/ 76241:
|
|
6497
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6498
|
+
|
|
6499
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6500
|
+
/* harmony export */ indexOfClosingTag: function() { return /* binding */ indexOfClosingTag; },
|
|
6501
|
+
/* harmony export */ indexOfOpenTag: function() { return /* binding */ indexOfOpenTag; },
|
|
6502
|
+
/* harmony export */ removeBetween: function() { return /* binding */ removeBetween; },
|
|
6503
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* binding */ removeEmptyMarkedTags; },
|
|
6504
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* binding */ removeTagsByPrefix; },
|
|
6505
|
+
/* harmony export */ removeWordWrappers: function() { return /* binding */ removeWordWrappers; },
|
|
6506
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* binding */ unwrapMarkedTags; }
|
|
6507
|
+
/* harmony export */ });
|
|
6508
|
+
/*!
|
|
6509
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6510
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
6511
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6512
|
+
*/ /**
|
|
6513
|
+
* @module helpers/html
|
|
6514
|
+
*/ // Single passes over HTML that comes from the clipboard or the editor value.
|
|
6515
|
+
// A regex with `[^>]*` or `.*?` before a required literal backtracks
|
|
6516
|
+
// quadratically on a long run of tag openers, so these walk with `indexOf`.
|
|
6517
|
+
const TAG_NAME = /[a-z0-9:-]/i;
|
|
6518
|
+
// The tags the Word clean-up strips: `<html>`, `<colgroup>`, `<col>`, `<o:p>` and their closers
|
|
6519
|
+
const WORD_WRAPPER_TAGS = [
|
|
6520
|
+
'<html',
|
|
6521
|
+
'</html',
|
|
6522
|
+
'<col',
|
|
6523
|
+
'</col',
|
|
6524
|
+
'<o:p',
|
|
6525
|
+
'</o:p'
|
|
6526
|
+
];
|
|
6527
|
+
function startsWithIgnoreCase(html, index, prefix) {
|
|
6528
|
+
return html.substr(index, prefix.length).toLowerCase() === prefix;
|
|
6529
|
+
}
|
|
6530
|
+
// The first `<` at or after `from` that opens one of the prefixes (`<meta`, `</html`, `<!--`)
|
|
6531
|
+
function indexOfPrefix(html, prefixes, from) {
|
|
6532
|
+
let index = html.indexOf('<', from);
|
|
6533
|
+
while(index !== -1){
|
|
6534
|
+
for (const prefix of prefixes){
|
|
6535
|
+
if (startsWithIgnoreCase(html, index, prefix)) {
|
|
6536
|
+
return [
|
|
6537
|
+
index,
|
|
6538
|
+
prefix
|
|
6539
|
+
];
|
|
6540
|
+
}
|
|
6541
|
+
}
|
|
6542
|
+
index = html.indexOf('<', index + 1);
|
|
6543
|
+
}
|
|
6544
|
+
return [
|
|
6545
|
+
-1,
|
|
6546
|
+
''
|
|
6547
|
+
];
|
|
6548
|
+
}
|
|
6549
|
+
/**
|
|
6550
|
+
* The first `</name>` at or after `from`, case-insensitive, or -1
|
|
6551
|
+
*/ function indexOfClosingTag(html, name, from) {
|
|
6552
|
+
const closing = '</' + name + '>';
|
|
6553
|
+
let index = html.indexOf('</', from);
|
|
6554
|
+
while(index !== -1){
|
|
6555
|
+
if (startsWithIgnoreCase(html, index, closing)) {
|
|
6556
|
+
return index;
|
|
6557
|
+
}
|
|
6558
|
+
index = html.indexOf('</', index + 2);
|
|
6559
|
+
}
|
|
6560
|
+
return -1;
|
|
6561
|
+
}
|
|
6562
|
+
/**
|
|
6563
|
+
* Remove every tag that starts with one of the prefixes, up to its `>`:
|
|
6564
|
+
* `removeTagsByPrefix(html, ['<meta', '<!--'])`
|
|
6565
|
+
*/ function removeTagsByPrefix(html, prefixes) {
|
|
6566
|
+
const lower = prefixes.map((prefix)=>prefix.toLowerCase());
|
|
6567
|
+
let result = '';
|
|
6568
|
+
let cursor = 0;
|
|
6569
|
+
for(;;){
|
|
6570
|
+
const [start] = indexOfPrefix(html, lower, cursor);
|
|
6571
|
+
if (start === -1) {
|
|
6572
|
+
break;
|
|
6573
|
+
}
|
|
6574
|
+
const end = html.indexOf('>', start);
|
|
6575
|
+
if (end === -1) {
|
|
6576
|
+
break;
|
|
6577
|
+
}
|
|
6578
|
+
result += html.slice(cursor, start);
|
|
6579
|
+
cursor = end + 1;
|
|
6580
|
+
}
|
|
6581
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
6582
|
+
}
|
|
6583
|
+
/**
|
|
6584
|
+
* Strip the Word wrapper tags and then the comments, as the clean-up always did
|
|
6585
|
+
*/ function removeWordWrappers(html) {
|
|
6586
|
+
return removeTagsByPrefix(removeTagsByPrefix(html, WORD_WRAPPER_TAGS), [
|
|
6587
|
+
'<!--'
|
|
6588
|
+
]);
|
|
6589
|
+
}
|
|
6590
|
+
// Every `</name>` position by name, so the closer of an element is found by a binary search
|
|
6591
|
+
function closingTagPositions(html) {
|
|
6592
|
+
const positions = new Map();
|
|
6593
|
+
let index = html.indexOf('</');
|
|
6594
|
+
while(index !== -1){
|
|
6595
|
+
const name = readTagName(html, index + 2).toLowerCase();
|
|
6596
|
+
if (name !== '' && html.charAt(index + 2 + name.length) === '>') {
|
|
6597
|
+
const list = positions.get(name);
|
|
6598
|
+
if (list) {
|
|
6599
|
+
list.push(index);
|
|
6600
|
+
} else {
|
|
6601
|
+
positions.set(name, [
|
|
6602
|
+
index
|
|
6603
|
+
]);
|
|
6604
|
+
}
|
|
6605
|
+
}
|
|
6606
|
+
index = html.indexOf('</', index + 2);
|
|
6607
|
+
}
|
|
6608
|
+
return positions;
|
|
6609
|
+
}
|
|
6610
|
+
// The first position in the sorted list that is >= from, or -1
|
|
6611
|
+
function firstAfter(list, from) {
|
|
6612
|
+
if (!list) {
|
|
6613
|
+
return -1;
|
|
6614
|
+
}
|
|
6615
|
+
let low = 0;
|
|
6616
|
+
let high = list.length;
|
|
6617
|
+
while(low < high){
|
|
6618
|
+
const middle = low + high >> 1;
|
|
6619
|
+
if (list[middle] < from) {
|
|
6620
|
+
low = middle + 1;
|
|
6621
|
+
} else {
|
|
6622
|
+
high = middle;
|
|
6623
|
+
}
|
|
6624
|
+
}
|
|
6625
|
+
return low < list.length ? list[low] : -1;
|
|
6626
|
+
}
|
|
6627
|
+
/**
|
|
6628
|
+
* The index of the first `<name>` or `<name …>` tag, or -1
|
|
6629
|
+
*/ function indexOfOpenTag(html, name) {
|
|
6630
|
+
const prefix = '<' + name.toLowerCase();
|
|
6631
|
+
let cursor = 0;
|
|
6632
|
+
for(;;){
|
|
6633
|
+
const [start] = indexOfPrefix(html, [
|
|
6634
|
+
prefix
|
|
6635
|
+
], cursor);
|
|
6636
|
+
if (start === -1) {
|
|
6637
|
+
return -1;
|
|
6638
|
+
}
|
|
6639
|
+
const next = html.charAt(start + prefix.length);
|
|
6640
|
+
if (next === '>') {
|
|
6641
|
+
return start;
|
|
6642
|
+
}
|
|
6643
|
+
if (/\s/.test(next)) {
|
|
6644
|
+
if (html.indexOf('>', start) === -1) {
|
|
6645
|
+
return -1;
|
|
6646
|
+
}
|
|
6647
|
+
return start;
|
|
6648
|
+
}
|
|
6649
|
+
cursor = start + 1;
|
|
6650
|
+
}
|
|
6651
|
+
}
|
|
6652
|
+
function readTagName(html, from) {
|
|
6653
|
+
let end = from;
|
|
6654
|
+
while(TAG_NAME.test(html.charAt(end))){
|
|
6655
|
+
end += 1;
|
|
6656
|
+
}
|
|
6657
|
+
return html.slice(from, end);
|
|
6658
|
+
}
|
|
6659
|
+
/**
|
|
6660
|
+
* Replace every `<name … marker …>inner</name>` with `inner`.
|
|
6661
|
+
* `name` null takes any tag; `keep` can refuse an element by its inner HTML.
|
|
6662
|
+
*/ function unwrapMarkedTags(html, name, marker, keep) {
|
|
6663
|
+
const lowerMarker = marker.toLowerCase();
|
|
6664
|
+
const prefixes = [
|
|
6665
|
+
name == null ? '<' : '<' + name.toLowerCase()
|
|
6666
|
+
];
|
|
6667
|
+
const closings = closingTagPositions(html);
|
|
6668
|
+
let result = '';
|
|
6669
|
+
let cursor = 0;
|
|
6670
|
+
for(;;){
|
|
6671
|
+
const [start] = indexOfPrefix(html, prefixes, cursor);
|
|
6672
|
+
if (start === -1) {
|
|
6673
|
+
break;
|
|
6674
|
+
}
|
|
6675
|
+
const tagName = (name !== null && name !== void 0 ? name : readTagName(html, start + 1)).toLowerCase();
|
|
6676
|
+
const gt = html.indexOf('>', start);
|
|
6677
|
+
if (gt === -1) {
|
|
6678
|
+
break;
|
|
6679
|
+
}
|
|
6680
|
+
const close = tagName !== '' && html.slice(start, gt).toLowerCase().includes(lowerMarker) ? firstAfter(closings.get(tagName), gt + 1) : -1;
|
|
6681
|
+
// Not a marked element: the `<` is text, the next one may still open an element
|
|
6682
|
+
if (close === -1) {
|
|
6683
|
+
result += html.slice(cursor, start + 1);
|
|
6684
|
+
cursor = start + 1;
|
|
6685
|
+
continue;
|
|
6686
|
+
}
|
|
6687
|
+
const inner = html.slice(gt + 1, close);
|
|
6688
|
+
const after = close + tagName.length + 3;
|
|
6689
|
+
result += html.slice(cursor, start);
|
|
6690
|
+
result += inner !== '' && (!keep || keep(inner)) ? inner : html.slice(start, after);
|
|
6691
|
+
cursor = after;
|
|
6692
|
+
}
|
|
6693
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
6694
|
+
}
|
|
6695
|
+
// The first `literal` at or after `from`, case-insensitive, or -1
|
|
6696
|
+
function indexOfLiteral(html, literal, from) {
|
|
6697
|
+
const head = literal.charAt(0);
|
|
6698
|
+
let index = html.indexOf(head, from);
|
|
6699
|
+
while(index !== -1){
|
|
6700
|
+
if (startsWithIgnoreCase(html, index, literal)) {
|
|
6701
|
+
return index;
|
|
6702
|
+
}
|
|
6703
|
+
index = html.indexOf(head, index + 1);
|
|
6704
|
+
}
|
|
6705
|
+
return -1;
|
|
6706
|
+
}
|
|
6707
|
+
/**
|
|
6708
|
+
* Remove every `open … openEnd … close` block whose opener holds `marker` (any opener when it is ''):
|
|
6709
|
+
* `removeBetween(html, '<style', '>', '</style>', 'jodit-box')`
|
|
6710
|
+
*/ function removeBetween(html, open, openEnd, close, marker = '') {
|
|
6711
|
+
const lowerOpen = open.toLowerCase();
|
|
6712
|
+
const lowerMarker = marker.toLowerCase();
|
|
6713
|
+
let result = '';
|
|
6714
|
+
let cursor = 0;
|
|
6715
|
+
for(;;){
|
|
6716
|
+
const start = indexOfLiteral(html, lowerOpen, cursor);
|
|
6717
|
+
if (start === -1) {
|
|
6718
|
+
break;
|
|
6719
|
+
}
|
|
6720
|
+
const end = indexOfLiteral(html, openEnd, start + open.length);
|
|
6721
|
+
if (end === -1) {
|
|
6722
|
+
break;
|
|
6723
|
+
}
|
|
6724
|
+
if (lowerMarker !== '' && !html.slice(start, end).toLowerCase().includes(lowerMarker)) {
|
|
6725
|
+
result += html.slice(cursor, end + openEnd.length);
|
|
6726
|
+
cursor = end + openEnd.length;
|
|
6727
|
+
continue;
|
|
6728
|
+
}
|
|
6729
|
+
const closeIndex = indexOfLiteral(html, close, end + openEnd.length);
|
|
6730
|
+
if (closeIndex === -1) {
|
|
6731
|
+
break;
|
|
6732
|
+
}
|
|
6733
|
+
result += html.slice(cursor, start);
|
|
6734
|
+
cursor = closeIndex + close.length;
|
|
6735
|
+
}
|
|
6736
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
6737
|
+
}
|
|
6738
|
+
/**
|
|
6739
|
+
* Remove every empty `<name … marker …></name>` element
|
|
6740
|
+
*/ function removeEmptyMarkedTags(html, name, marker) {
|
|
6741
|
+
const lowerName = name.toLowerCase();
|
|
6742
|
+
const lowerMarker = marker.toLowerCase();
|
|
6743
|
+
const closing = '</' + lowerName + '>';
|
|
6744
|
+
let result = '';
|
|
6745
|
+
let cursor = 0;
|
|
6746
|
+
for(;;){
|
|
6747
|
+
const [start] = indexOfPrefix(html, [
|
|
6748
|
+
'<' + lowerName
|
|
6749
|
+
], cursor);
|
|
6750
|
+
if (start === -1) {
|
|
6751
|
+
break;
|
|
6752
|
+
}
|
|
6753
|
+
const gt = html.indexOf('>', start);
|
|
6754
|
+
if (gt === -1) {
|
|
6755
|
+
break;
|
|
6756
|
+
}
|
|
6757
|
+
if (html.slice(start, gt).toLowerCase().includes(lowerMarker) && startsWithIgnoreCase(html, gt + 1, closing)) {
|
|
6758
|
+
result += html.slice(cursor, start);
|
|
6759
|
+
cursor = gt + 1 + closing.length;
|
|
6760
|
+
continue;
|
|
6761
|
+
}
|
|
6762
|
+
result += html.slice(cursor, gt + 1);
|
|
6763
|
+
cursor = gt + 1;
|
|
6764
|
+
}
|
|
6765
|
+
return cursor === 0 ? html : result + html.slice(cursor);
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6768
|
+
|
|
6337
6769
|
/***/ }),
|
|
6338
6770
|
|
|
6339
6771
|
/***/ 90723:
|
|
@@ -6586,6 +7018,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6586
7018
|
/* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.humanSizeToBytes; },
|
|
6587
7019
|
/* harmony export */ i18n: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.i18n; },
|
|
6588
7020
|
/* harmony export */ inView: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.inView; },
|
|
7021
|
+
/* harmony export */ indexOfClosingTag: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag; },
|
|
7022
|
+
/* harmony export */ indexOfOpenTag: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.indexOfOpenTag; },
|
|
6589
7023
|
/* harmony export */ innerWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.innerWidth; },
|
|
6590
7024
|
/* harmony export */ isAbortError: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isAbortError; },
|
|
6591
7025
|
/* harmony export */ isArray: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.isArray; },
|
|
@@ -6644,6 +7078,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6644
7078
|
/* harmony export */ prepareMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.prepareMedia; },
|
|
6645
7079
|
/* harmony export */ previewBox: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.previewBox; },
|
|
6646
7080
|
/* harmony export */ refs: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.refs; },
|
|
7081
|
+
/* harmony export */ removeBetween: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.removeBetween; },
|
|
7082
|
+
/* harmony export */ removeEmptyMarkedTags: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.removeEmptyMarkedTags; },
|
|
7083
|
+
/* harmony export */ removeTagsByPrefix: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.removeTagsByPrefix; },
|
|
7084
|
+
/* harmony export */ removeWordWrappers: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.removeWordWrappers; },
|
|
6647
7085
|
/* harmony export */ reset: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.reset; },
|
|
6648
7086
|
/* harmony export */ resolveElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.resolveElement; },
|
|
6649
7087
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.safeHTML; },
|
|
@@ -6660,7 +7098,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6660
7098
|
/* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
|
|
6661
7099
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
|
|
6662
7100
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
|
|
7101
|
+
/* harmony export */ trimInvEnd: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInvEnd; },
|
|
6663
7102
|
/* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
|
|
7103
|
+
/* harmony export */ unwrapMarkedTags: function() { return /* reexport safe */ _html_index_js__WEBPACK_IMPORTED_MODULE_4__.unwrapMarkedTags; },
|
|
6664
7104
|
/* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
|
|
6665
7105
|
/* harmony export */ });
|
|
6666
7106
|
/* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
|
|
@@ -7530,6 +7970,7 @@ function size(subject) {
|
|
|
7530
7970
|
/* harmony export */ trim: function() { return /* reexport safe */ _trim_js__WEBPACK_IMPORTED_MODULE_5__.trim; },
|
|
7531
7971
|
/* harmony export */ trimChars: function() { return /* reexport safe */ _trim_js__WEBPACK_IMPORTED_MODULE_5__.trimChars; },
|
|
7532
7972
|
/* harmony export */ trimInv: function() { return /* reexport safe */ _trim_js__WEBPACK_IMPORTED_MODULE_5__.trimInv; },
|
|
7973
|
+
/* harmony export */ trimInvEnd: function() { return /* reexport safe */ _trim_js__WEBPACK_IMPORTED_MODULE_5__.trimInvEnd; },
|
|
7533
7974
|
/* harmony export */ ucfirst: function() { return /* reexport safe */ _ucfirst_js__WEBPACK_IMPORTED_MODULE_6__.ucfirst; }
|
|
7534
7975
|
/* harmony export */ });
|
|
7535
7976
|
/* harmony import */ var _camel_case_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87058);
|
|
@@ -7622,29 +8063,51 @@ const CamelCaseToKebabCase = (key)=>{
|
|
|
7622
8063
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7623
8064
|
/* harmony export */ trim: function() { return /* binding */ trim; },
|
|
7624
8065
|
/* harmony export */ trimChars: function() { return /* binding */ trimChars; },
|
|
7625
|
-
/* harmony export */ trimInv: function() { return /* binding */ trimInv; }
|
|
8066
|
+
/* harmony export */ trimInv: function() { return /* binding */ trimInv; },
|
|
8067
|
+
/* harmony export */ trimInvEnd: function() { return /* binding */ trimInvEnd; }
|
|
7626
8068
|
/* harmony export */ });
|
|
7627
|
-
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
7628
8069
|
/*!
|
|
7629
8070
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7630
8071
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7631
8072
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
7632
8073
|
*/ /**
|
|
7633
8074
|
* @module helpers/string
|
|
7634
|
-
*/
|
|
8075
|
+
*/ const SPACE = /[\s\u200b]/;
|
|
8076
|
+
const INVISIBLE = /\uFEFF/;
|
|
8077
|
+
// Cut the chars matching `char` from both ends; `[…]+$` backtracks on a long run that is not at the end
|
|
8078
|
+
function trimBy(value, char) {
|
|
8079
|
+
let start = 0;
|
|
8080
|
+
let end = value.length;
|
|
8081
|
+
while(start < end && char.test(value.charAt(start))){
|
|
8082
|
+
start += 1;
|
|
8083
|
+
}
|
|
8084
|
+
while(end > start && char.test(value.charAt(end - 1))){
|
|
8085
|
+
end -= 1;
|
|
8086
|
+
}
|
|
8087
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
8088
|
+
}
|
|
7635
8089
|
/**
|
|
7636
8090
|
* It clears the line of all auxiliary invisible characters , from the spaces and line breaks , tabs
|
|
7637
8091
|
* from the beginning and end of the line
|
|
7638
8092
|
*/ function trim(value) {
|
|
7639
|
-
return value
|
|
8093
|
+
return trimBy(value, SPACE);
|
|
7640
8094
|
}
|
|
7641
8095
|
function trimChars(value, chars) {
|
|
7642
|
-
return value
|
|
8096
|
+
return trimBy(value, RegExp(`[${chars}]`));
|
|
7643
8097
|
}
|
|
7644
8098
|
/**
|
|
7645
8099
|
* Trim only invisible chars
|
|
7646
8100
|
*/ function trimInv(value) {
|
|
7647
|
-
return value
|
|
8101
|
+
return trimBy(value, INVISIBLE);
|
|
8102
|
+
}
|
|
8103
|
+
/**
|
|
8104
|
+
* Without the invisible chars at the end
|
|
8105
|
+
*/ function trimInvEnd(value) {
|
|
8106
|
+
let end = value.length;
|
|
8107
|
+
while(end > 0 && INVISIBLE.test(value.charAt(end - 1))){
|
|
8108
|
+
end -= 1;
|
|
8109
|
+
}
|
|
8110
|
+
return end === value.length ? value : value.slice(0, end);
|
|
7648
8111
|
}
|
|
7649
8112
|
|
|
7650
8113
|
|
|
@@ -10913,18 +11376,19 @@ function usable(ranges, shadowRoot) {
|
|
|
10913
11376
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10914
11377
|
|
|
10915
11378
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10916
|
-
/* harmony export */ composedRanges: function() { return /* reexport safe */
|
|
11379
|
+
/* harmony export */ composedRanges: function() { return /* reexport safe */ _composed_ranges_js__WEBPACK_IMPORTED_MODULE_3__.composedRanges; },
|
|
10917
11380
|
/* harmony export */ cursorInTheEdgeOfString: function() { return /* binding */ cursorInTheEdgeOfString; },
|
|
10918
11381
|
/* harmony export */ findCorrectCurrentNode: function() { return /* binding */ findCorrectCurrentNode; },
|
|
10919
|
-
/* harmony export */ isMoved: function() { return /* reexport safe */
|
|
10920
|
-
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */
|
|
11382
|
+
/* harmony export */ isMoved: function() { return /* reexport safe */ _is_moved_js__WEBPACK_IMPORTED_MODULE_4__.isMoved; },
|
|
11383
|
+
/* harmony export */ moveNodeInsideStart: function() { return /* reexport safe */ _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_5__.moveNodeInsideStart; }
|
|
10921
11384
|
/* harmony export */ });
|
|
10922
11385
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
10923
11386
|
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
10924
|
-
/* harmony import */ var
|
|
10925
|
-
/* harmony import */ var
|
|
10926
|
-
/* harmony import */ var
|
|
10927
|
-
/* harmony import */ var
|
|
11387
|
+
/* harmony import */ var _helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
|
|
11388
|
+
/* harmony import */ var _composed_ranges_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79505);
|
|
11389
|
+
/* harmony import */ var _is_moved_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12604);
|
|
11390
|
+
/* harmony import */ var _move_node_inside_start_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26716);
|
|
11391
|
+
/* harmony import */ var _move_the_node_along_the_edge_outward_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43463);
|
|
10928
11392
|
/*!
|
|
10929
11393
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
10930
11394
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -10937,6 +11401,7 @@ function usable(ranges, shadowRoot) {
|
|
|
10937
11401
|
|
|
10938
11402
|
|
|
10939
11403
|
|
|
11404
|
+
|
|
10940
11405
|
/**
|
|
10941
11406
|
* Despite the name, returns `true` when the cursor is NOT at the checked edge
|
|
10942
11407
|
* of the text node: there is significant (non invisible-space) text between
|
|
@@ -10945,7 +11410,7 @@ function usable(ranges, shadowRoot) {
|
|
|
10945
11410
|
*/ function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
10946
11411
|
var _a;
|
|
10947
11412
|
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
10948
|
-
if (end &&
|
|
11413
|
+
if (end && (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimInvEnd)(text).length > offset) {
|
|
10949
11414
|
return true;
|
|
10950
11415
|
}
|
|
10951
11416
|
const inv = (0,_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_START)().exec(text);
|
|
@@ -18211,11 +18676,12 @@ class CommitMode {
|
|
|
18211
18676
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
18212
18677
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
18213
18678
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
18214
|
-
/* harmony import */ var
|
|
18215
|
-
/* harmony import */ var
|
|
18216
|
-
/* harmony import */ var
|
|
18217
|
-
/* harmony import */ var
|
|
18218
|
-
/* harmony import */ var
|
|
18679
|
+
/* harmony import */ var _core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76241);
|
|
18680
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
18681
|
+
/* harmony import */ var _core_request_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41601);
|
|
18682
|
+
/* harmony import */ var _core_traits_dlgs_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(70231);
|
|
18683
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6441);
|
|
18684
|
+
/* harmony import */ var _modules_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41409);
|
|
18219
18685
|
/*!
|
|
18220
18686
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18221
18687
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18237,6 +18703,7 @@ var Jodit_1;
|
|
|
18237
18703
|
|
|
18238
18704
|
|
|
18239
18705
|
|
|
18706
|
+
|
|
18240
18707
|
const FOCUS_EVENTS = new Set([
|
|
18241
18708
|
'focus',
|
|
18242
18709
|
'blur',
|
|
@@ -18267,7 +18734,7 @@ const NOEDIT = {
|
|
|
18267
18734
|
* `alignClasses.img` when that isn't set
|
|
18268
18735
|
*/ function makeOptions(options) {
|
|
18269
18736
|
var _a;
|
|
18270
|
-
const opt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(options || {},
|
|
18737
|
+
const opt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)(options || {}, _config_js__WEBPACK_IMPORTED_MODULE_8__.Config.defaultOptions);
|
|
18271
18738
|
if (opt.imageAlignClasses && !((_a = opt.alignClasses) === null || _a === void 0 ? void 0 : _a.img)) {
|
|
18272
18739
|
opt.alignClasses = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigProto)({
|
|
18273
18740
|
img: opt.imageAlignClasses
|
|
@@ -18275,7 +18742,7 @@ const NOEDIT = {
|
|
|
18275
18742
|
}
|
|
18276
18743
|
return opt;
|
|
18277
18744
|
}
|
|
18278
|
-
let Jodit = Jodit_1 = class Jodit extends
|
|
18745
|
+
let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.ViewWithToolbar {
|
|
18279
18746
|
/** @override */ className() {
|
|
18280
18747
|
return 'Jodit';
|
|
18281
18748
|
}
|
|
@@ -18318,7 +18785,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18318
18785
|
* Return a default timeout period in milliseconds for some debounce or throttle functions.
|
|
18319
18786
|
* By default, `{history.timeout}` options
|
|
18320
18787
|
*/ get defaultTimeout() {
|
|
18321
|
-
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout :
|
|
18788
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout : _config_js__WEBPACK_IMPORTED_MODULE_8__.Config.defaultOptions.defaultTimeout;
|
|
18322
18789
|
}
|
|
18323
18790
|
/**
|
|
18324
18791
|
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
@@ -18348,7 +18815,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18348
18815
|
/**
|
|
18349
18816
|
* Default settings
|
|
18350
18817
|
*/ static get defaultOptions() {
|
|
18351
|
-
return
|
|
18818
|
+
return _config_js__WEBPACK_IMPORTED_MODULE_8__.Config.defaultOptions;
|
|
18352
18819
|
}
|
|
18353
18820
|
/**
|
|
18354
18821
|
* Deep-merges partial options into the global defaults without replacing
|
|
@@ -18396,7 +18863,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18396
18863
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.ConfigMerge)(Jodit_1.defaultOptions, options);
|
|
18397
18864
|
}
|
|
18398
18865
|
get createInside() {
|
|
18399
|
-
return new
|
|
18866
|
+
return new _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Create(()=>this.ed, this.o.createAttributes);
|
|
18400
18867
|
}
|
|
18401
18868
|
__setPlaceField(field, value) {
|
|
18402
18869
|
if (!this.currentPlace) {
|
|
@@ -18596,7 +19063,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18596
19063
|
}
|
|
18597
19064
|
value = this.getNativeEditorValue().replace(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
18598
19065
|
if (removeSelectionMarkers) {
|
|
18599
|
-
value =
|
|
19066
|
+
value = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeEmptyMarkedTags)(value, 'span', 'id="jodit-selection_marker_');
|
|
18600
19067
|
}
|
|
18601
19068
|
if (value === '<br>') {
|
|
18602
19069
|
value = '';
|
|
@@ -18910,7 +19377,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
18910
19377
|
return this.getMode();
|
|
18911
19378
|
}
|
|
18912
19379
|
const active = this.od.activeElement;
|
|
18913
|
-
if (active && (active === this.iframe ||
|
|
19380
|
+
if (active && (active === this.iframe || _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.isOrContains(this.editor, active) || _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.isOrContains(this.toolbar.container, active))) {
|
|
18914
19381
|
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG;
|
|
18915
19382
|
}
|
|
18916
19383
|
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE;
|
|
@@ -19063,7 +19530,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19063
19530
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(element.attributes).forEach((attr)=>{
|
|
19064
19531
|
const name = attr.name;
|
|
19065
19532
|
let value = attr.value;
|
|
19066
|
-
if (
|
|
19533
|
+
if (_config_js__WEBPACK_IMPORTED_MODULE_8__.Config.defaultOptions[name] !== undefined && (!options || options[name] === undefined)) {
|
|
19067
19534
|
if ([
|
|
19068
19535
|
'readonly',
|
|
19069
19536
|
'disabled'
|
|
@@ -19100,7 +19567,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19100
19567
|
container = element;
|
|
19101
19568
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element, __defaultClassesKey, element.className.toString());
|
|
19102
19569
|
buffer = container.innerHTML;
|
|
19103
|
-
|
|
19570
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.detach(container);
|
|
19104
19571
|
}
|
|
19105
19572
|
container.classList.add('jodit_inline');
|
|
19106
19573
|
container.classList.add('jodit-container');
|
|
@@ -19108,7 +19575,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19108
19575
|
// actual for inline mode
|
|
19109
19576
|
if (element !== container) {
|
|
19110
19577
|
// hide source element
|
|
19111
|
-
const display = (0,
|
|
19578
|
+
const display = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(element, 'display');
|
|
19112
19579
|
if (display) {
|
|
19113
19580
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element, __defaultStyleDisplayKey, display);
|
|
19114
19581
|
}
|
|
@@ -19120,21 +19587,21 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19120
19587
|
// the toolbar box below it when (re)attaching the toolbar container.
|
|
19121
19588
|
const aboveSlot = this.c.div(this.getFullElName(SLOT, 'above'), NOEDIT);
|
|
19122
19589
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(aboveSlot, 'data-jodit-above-toolbar', '');
|
|
19123
|
-
|
|
19590
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.appendChildFirst(container, aboveSlot);
|
|
19124
19591
|
const topSlot = this.c.div(this.getFullElName(SLOT, 'top'), NOEDIT);
|
|
19125
|
-
|
|
19592
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(container, topSlot);
|
|
19126
19593
|
const centerSlot = this.c.div(this.getFullElName(SLOT, 'center'), NOEDIT);
|
|
19127
19594
|
const workplace = this.c.div('jodit-workplace', NOEDIT);
|
|
19128
19595
|
const leftSlot = this.c.div(this.getFullElName(SLOT, 'left'), NOEDIT);
|
|
19129
19596
|
const rightSlot = this.c.div(this.getFullElName(SLOT, 'right'), NOEDIT);
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
|
|
19133
|
-
|
|
19597
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(centerSlot, leftSlot);
|
|
19598
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(centerSlot, workplace);
|
|
19599
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(centerSlot, rightSlot);
|
|
19600
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(container, centerSlot);
|
|
19134
19601
|
const bottomPanel = this.c.div(this.getFullElName(SLOT, 'bottom'), NOEDIT);
|
|
19135
|
-
|
|
19602
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(container, bottomPanel);
|
|
19136
19603
|
if (element.parentNode && element !== container) {
|
|
19137
|
-
|
|
19604
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.before(element, container);
|
|
19138
19605
|
}
|
|
19139
19606
|
Object.defineProperty(element, 'component', {
|
|
19140
19607
|
enumerable: false,
|
|
@@ -19146,7 +19613,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19146
19613
|
'aria-disabled': false,
|
|
19147
19614
|
tabindex: this.o.tabIndex
|
|
19148
19615
|
});
|
|
19149
|
-
|
|
19616
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(workplace, editor);
|
|
19150
19617
|
const currentPlace = {
|
|
19151
19618
|
editor,
|
|
19152
19619
|
element,
|
|
@@ -19160,9 +19627,9 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19160
19627
|
left: leftSlot,
|
|
19161
19628
|
right: rightSlot
|
|
19162
19629
|
},
|
|
19163
|
-
statusbar: new
|
|
19630
|
+
statusbar: new _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.StatusBar(this, container),
|
|
19164
19631
|
options: this.isReady ? makeOptions(options) : this.options,
|
|
19165
|
-
history: new
|
|
19632
|
+
history: new _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.History(this),
|
|
19166
19633
|
editorWindow: this.ow
|
|
19167
19634
|
};
|
|
19168
19635
|
this.__elementToPlace.set(editor, currentPlace);
|
|
@@ -19195,7 +19662,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19195
19662
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.callPromise)(initResult, init);
|
|
19196
19663
|
}
|
|
19197
19664
|
addDisclaimer(elm) {
|
|
19198
|
-
|
|
19665
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.append(this.workplace, elm);
|
|
19199
19666
|
}
|
|
19200
19667
|
/**
|
|
19201
19668
|
* Set current place object
|
|
@@ -19258,7 +19725,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19258
19725
|
return;
|
|
19259
19726
|
}
|
|
19260
19727
|
if (stayDefault === false || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isPromise)(stayDefault)) {
|
|
19261
|
-
|
|
19728
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.safeRemove(defaultEditorArea);
|
|
19262
19729
|
}
|
|
19263
19730
|
addClassNames(this.o.editorClassName, this.editor);
|
|
19264
19731
|
if (this.o.style) {
|
|
@@ -19307,7 +19774,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19307
19774
|
// and such an element stays in the editor
|
|
19308
19775
|
if (FOCUS_EVENTS.has(type)) {
|
|
19309
19776
|
const inner = type === 'focusin' || type === 'focusout';
|
|
19310
|
-
if (inner === (event.target === editor) ||
|
|
19777
|
+
if (inner === (event.target === editor) || _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.isOrContains(editor, event.relatedTarget)) {
|
|
19311
19778
|
return;
|
|
19312
19779
|
}
|
|
19313
19780
|
if (inner) {
|
|
@@ -19344,7 +19811,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19344
19811
|
});
|
|
19345
19812
|
}
|
|
19346
19813
|
fetch(url, options) {
|
|
19347
|
-
const ajax = new
|
|
19814
|
+
const ajax = new _core_request_index_js__WEBPACK_IMPORTED_MODULE_6__.Ajax({
|
|
19348
19815
|
url,
|
|
19349
19816
|
...options
|
|
19350
19817
|
}, this.o.defaultAjaxOptions);
|
|
@@ -19366,7 +19833,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19366
19833
|
if (this.isInDestruct) {
|
|
19367
19834
|
return;
|
|
19368
19835
|
}
|
|
19369
|
-
this.setStatus(
|
|
19836
|
+
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.STATUSES.beforeDestruct);
|
|
19370
19837
|
this.__elementToPlace.clear();
|
|
19371
19838
|
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')) === null || _a === void 0 ? void 0 : _a.clear();
|
|
19372
19839
|
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')) === null || _b === void 0 ? void 0 : _b.clear();
|
|
@@ -19404,17 +19871,17 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19404
19871
|
this.e.off(container);
|
|
19405
19872
|
this.e.off(element);
|
|
19406
19873
|
this.e.off(editor);
|
|
19407
|
-
|
|
19408
|
-
|
|
19874
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.safeRemove(workplace);
|
|
19875
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.safeRemove(editor);
|
|
19409
19876
|
if (container !== element) {
|
|
19410
|
-
|
|
19877
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.safeRemove(container);
|
|
19411
19878
|
}
|
|
19412
19879
|
Object.defineProperty(element, 'component', {
|
|
19413
19880
|
enumerable: false,
|
|
19414
19881
|
configurable: true,
|
|
19415
19882
|
value: null
|
|
19416
19883
|
});
|
|
19417
|
-
|
|
19884
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Dom.safeRemove(iframe);
|
|
19418
19885
|
// inline mode
|
|
19419
19886
|
if (container === element) {
|
|
19420
19887
|
element.innerHTML = tmpValue;
|
|
@@ -19466,7 +19933,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19466
19933
|
this.destruct();
|
|
19467
19934
|
throw e;
|
|
19468
19935
|
}
|
|
19469
|
-
this.setStatus(
|
|
19936
|
+
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.STATUSES.beforeInit);
|
|
19470
19937
|
this.id = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.resolveElement)(element, this.o.shadowRoot || this.od), 'id') || new Date().getTime().toString();
|
|
19471
19938
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.instances[this.id] = this;
|
|
19472
19939
|
this.attachEvents(options);
|
|
@@ -19476,7 +19943,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19476
19943
|
}
|
|
19477
19944
|
});
|
|
19478
19945
|
this.e.on('prepareWYSIWYGEditor', this.__prepareWYSIWYGEditor);
|
|
19479
|
-
this.selection = new
|
|
19946
|
+
this.selection = new _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Selection(this);
|
|
19480
19947
|
const beforeInitHookResult = this.beforeInitHook();
|
|
19481
19948
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.callPromise)(beforeInitHookResult, ()=>{
|
|
19482
19949
|
if (this.isInDestruct) {
|
|
@@ -19500,7 +19967,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
19500
19967
|
this.e.fire('afterInit', this);
|
|
19501
19968
|
}
|
|
19502
19969
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.callPromise)(this.afterInitHook());
|
|
19503
|
-
this.setStatus(
|
|
19970
|
+
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_9__.STATUSES.ready);
|
|
19504
19971
|
this.e.fire('afterConstructor', this);
|
|
19505
19972
|
};
|
|
19506
19973
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.callPromise)(addPlaceResult, init);
|
|
@@ -19516,7 +19983,7 @@ Jodit.constants = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__;
|
|
|
19516
19983
|
Jodit.instances = _core_global_js__WEBPACK_IMPORTED_MODULE_2__.instances;
|
|
19517
19984
|
Jodit.lang = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.lang;
|
|
19518
19985
|
Jodit.core = {
|
|
19519
|
-
Plugin:
|
|
19986
|
+
Plugin: _modules_index_js__WEBPACK_IMPORTED_MODULE_9__.Plugin
|
|
19520
19987
|
};
|
|
19521
19988
|
__decorate([
|
|
19522
19989
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cache
|
|
@@ -19543,7 +20010,7 @@ __decorate([
|
|
|
19543
20010
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
19544
20011
|
], Jodit.prototype, "__prepareWYSIWYGEditor", null);
|
|
19545
20012
|
Jodit = Jodit_1 = __decorate([
|
|
19546
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.derive)(
|
|
20013
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.derive)(_core_traits_dlgs_js__WEBPACK_IMPORTED_MODULE_7__.Dlgs)
|
|
19547
20014
|
], Jodit);
|
|
19548
20015
|
|
|
19549
20016
|
function addClassNames(className, elm) {
|
|
@@ -38596,7 +39063,18 @@ const KEEPS_SPACES = new Set([
|
|
|
38596
39063
|
/**
|
|
38597
39064
|
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
38598
39065
|
* line break, a block or text starting (or ending) with a plain space
|
|
38599
|
-
*/
|
|
39066
|
+
*/ // The run of spaces at the end (or the start) of the text becomes nbsp; counted, as `/ +$/` backtracks on a long run
|
|
39067
|
+
function replaceEdgeSpaces(text, atEnd) {
|
|
39068
|
+
let count = 0;
|
|
39069
|
+
while(count < text.length && text.charAt(atEnd ? text.length - 1 - count : count) === ' '){
|
|
39070
|
+
count += 1;
|
|
39071
|
+
}
|
|
39072
|
+
if (count === 0) {
|
|
39073
|
+
return text;
|
|
39074
|
+
}
|
|
39075
|
+
return atEnd ? text.slice(0, text.length - count) + _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(count) : _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(count) + text.slice(count);
|
|
39076
|
+
}
|
|
39077
|
+
function hidesSpace(neighbor, edge) {
|
|
38600
39078
|
var _a;
|
|
38601
39079
|
return !neighbor || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, 'br') || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(neighbor) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && edge.test((_a = neighbor.nodeValue) !== null && _a !== void 0 ? _a : '');
|
|
38602
39080
|
}
|
|
@@ -38781,10 +39259,10 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.P
|
|
|
38781
39259
|
const before = this.__findNeighbor(fake, true, block);
|
|
38782
39260
|
const after = this.__findNeighbor(fake, false, block);
|
|
38783
39261
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
|
|
38784
|
-
before.nodeValue = before.nodeValue
|
|
39262
|
+
before.nodeValue = replaceEdgeSpaces(before.nodeValue, true);
|
|
38785
39263
|
}
|
|
38786
39264
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
|
|
38787
|
-
after.nodeValue = after.nodeValue
|
|
39265
|
+
after.nodeValue = replaceEdgeSpaces(after.nodeValue, false);
|
|
38788
39266
|
}
|
|
38789
39267
|
}
|
|
38790
39268
|
/**
|
|
@@ -41797,7 +42275,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41797
42275
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
41798
42276
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
41799
42277
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
41800
|
-
/* harmony import */ var
|
|
42278
|
+
/* harmony import */ var _core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76241);
|
|
42279
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50963);
|
|
41801
42280
|
/*!
|
|
41802
42281
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41803
42282
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -41808,6 +42287,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41808
42287
|
|
|
41809
42288
|
|
|
41810
42289
|
|
|
42290
|
+
|
|
41811
42291
|
/**
|
|
41812
42292
|
* Iframe plugin - use `iframe` instead of DIV in editor. It can be need when you want to attach custom styles in editor
|
|
41813
42293
|
* in backend of you system
|
|
@@ -41866,13 +42346,66 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
|
|
|
41866
42346
|
const toggleEditable = ()=>{
|
|
41867
42347
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(doc.body, 'contenteditable', editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE && !editor.getReadOnly() || null);
|
|
41868
42348
|
};
|
|
42349
|
+
// The start of the whitespace run that ends at `to`
|
|
42350
|
+
const skipBack = (text, to)=>{
|
|
42351
|
+
while(to > 0 && /\s/.test(text.charAt(to - 1))){
|
|
42352
|
+
to -= 1;
|
|
42353
|
+
}
|
|
42354
|
+
return to;
|
|
42355
|
+
};
|
|
42356
|
+
// The editor's own attributes on `<body>`: `min-height` and `contenteditable=true`
|
|
42357
|
+
const cleanBodyTag = (tag)=>{
|
|
42358
|
+
tag = tag.replace(/min-height["'\s]*:[\s"']*[0-9]+(px|%)/i, '');
|
|
42359
|
+
const skip = (from, chars)=>{
|
|
42360
|
+
while(chars.test(tag.charAt(from))){
|
|
42361
|
+
from += 1;
|
|
42362
|
+
}
|
|
42363
|
+
return from;
|
|
42364
|
+
};
|
|
42365
|
+
let index = tag.indexOf('contenteditable');
|
|
42366
|
+
while(index !== -1){
|
|
42367
|
+
let to = skip(index + 'contenteditable'.length, /["'\s]/);
|
|
42368
|
+
if (tag.charAt(to) === '=') {
|
|
42369
|
+
to = skip(to + 1, /[\s"']/);
|
|
42370
|
+
if (tag.startsWith('true', to)) {
|
|
42371
|
+
to = skip(to + 4, /["']/);
|
|
42372
|
+
let from = index;
|
|
42373
|
+
if (/["']/.test(tag.charAt(from - 1))) {
|
|
42374
|
+
from -= 1;
|
|
42375
|
+
}
|
|
42376
|
+
from = skipBack(tag, from);
|
|
42377
|
+
return tag.slice(0, from) + tag.slice(to);
|
|
42378
|
+
}
|
|
42379
|
+
}
|
|
42380
|
+
index = tag.indexOf('contenteditable', index + 1);
|
|
42381
|
+
}
|
|
42382
|
+
return tag;
|
|
42383
|
+
};
|
|
41869
42384
|
const clearMarkers = (html)=>{
|
|
41870
42385
|
// The plugins' own styles, from `getContainer`, aren't part of the value
|
|
41871
|
-
html =
|
|
41872
|
-
const
|
|
41873
|
-
|
|
41874
|
-
|
|
41875
|
-
|
|
42386
|
+
html = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(html, '<style', '>', '</style>', 'jodit-box');
|
|
42387
|
+
const bodyStart = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.indexOfOpenTag)(html, 'body');
|
|
42388
|
+
let bodyEnd = -1;
|
|
42389
|
+
for(let index = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag)(html, 'body', bodyStart + 1); index !== -1; index = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.indexOfClosingTag)(html, 'body', index + 1)){
|
|
42390
|
+
bodyEnd = index;
|
|
42391
|
+
}
|
|
42392
|
+
if (bodyStart !== -1 && bodyEnd !== -1) {
|
|
42393
|
+
const afterBody = bodyEnd + '</body>'.length;
|
|
42394
|
+
const gt = html.indexOf('>', bodyStart);
|
|
42395
|
+
let body = html.slice(bodyStart, afterBody);
|
|
42396
|
+
if (gt !== -1 && gt < bodyEnd) {
|
|
42397
|
+
body = cleanBodyTag(html.slice(bodyStart, gt)) + html.slice(gt, afterBody);
|
|
42398
|
+
}
|
|
42399
|
+
for (const tag of [
|
|
42400
|
+
'style',
|
|
42401
|
+
'script',
|
|
42402
|
+
'span'
|
|
42403
|
+
]){
|
|
42404
|
+
body = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(body, '<' + tag, '>', '</' + tag + '>', 'jodit');
|
|
42405
|
+
}
|
|
42406
|
+
// remove markers: the spans outside the body are the editor's own
|
|
42407
|
+
const stripSpans = (part)=>(0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeBetween)((0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeBetween)(part, '<span', '>', '</span>'), '<span', '>', '</span>');
|
|
42408
|
+
html = (stripSpans(html.slice(0, bodyStart)) + body + stripSpans(html.slice(afterBody))).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g, '$1$2$3$5').replace(/(<[^<]+?)\sclass="[\s]*"/gim, '$1').replace(/(<[^<]+?)\sstyle="[\s;]*"/gim, '$1').replace(/(<[^<]+?)\sdir="[\s]*"/gim, '$1');
|
|
41876
42409
|
}
|
|
41877
42410
|
return html;
|
|
41878
42411
|
};
|
|
@@ -47337,9 +47870,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
47337
47870
|
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
47338
47871
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
47339
47872
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
47340
|
-
/* harmony import */ var
|
|
47341
|
-
/* harmony import */ var
|
|
47342
|
-
/* harmony import */ var
|
|
47873
|
+
/* harmony import */ var _core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76241);
|
|
47874
|
+
/* harmony import */ var _core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43555);
|
|
47875
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41180);
|
|
47876
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(757);
|
|
47343
47877
|
/*!
|
|
47344
47878
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
47345
47879
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -47350,6 +47884,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
47350
47884
|
|
|
47351
47885
|
|
|
47352
47886
|
|
|
47887
|
+
|
|
47353
47888
|
/**
|
|
47354
47889
|
* Process `video` and `audio`
|
|
47355
47890
|
*/ function media(editor) {
|
|
@@ -47357,10 +47892,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
47357
47892
|
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock, mediaWrappers } = editor.options;
|
|
47358
47893
|
const wrap = (element)=>{
|
|
47359
47894
|
var _a;
|
|
47360
|
-
if (element.parentNode && (0,
|
|
47895
|
+
if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
|
|
47361
47896
|
element = element.parentNode;
|
|
47362
47897
|
} else if (mediaWrappers[element.nodeName.toLowerCase()]) {
|
|
47363
|
-
element = (_a = (0,
|
|
47898
|
+
element = (_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, element)) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.wrapMedia)(editor, element);
|
|
47364
47899
|
} else if (mediaInFakeBlock) {
|
|
47365
47900
|
const media = element;
|
|
47366
47901
|
const wrapper = editor.createInside.element(mediaFakeTag, {
|
|
@@ -47369,13 +47904,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
47369
47904
|
draggable: true,
|
|
47370
47905
|
[`data-${keyFake}`]: 1
|
|
47371
47906
|
});
|
|
47372
|
-
(0,
|
|
47907
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(wrapper, 'style', (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, 'style'));
|
|
47373
47908
|
// The wrapper fits the media, whose size changes as its metadata loads
|
|
47374
47909
|
// and as it's resized. A percentage width is of the line, so it takes that
|
|
47375
47910
|
const fit = ()=>{
|
|
47376
|
-
(0,
|
|
47377
|
-
display: (0,
|
|
47378
|
-
width: (0,
|
|
47911
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(wrapper, {
|
|
47912
|
+
display: (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(media, 'display') === 'inline-block' ? 'inline-block' : 'block',
|
|
47913
|
+
width: (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.cssInline)(media, 'width').endsWith('%') ? '' : 'fit-content',
|
|
47379
47914
|
height: ''
|
|
47380
47915
|
});
|
|
47381
47916
|
};
|
|
@@ -47412,15 +47947,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
|
|
|
47412
47947
|
}
|
|
47413
47948
|
if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
|
|
47414
47949
|
editor.e.on('afterGetValueFromEditor', (data)=>{
|
|
47415
|
-
|
|
47416
|
-
if (rxp.test(data.value)) {
|
|
47417
|
-
data.value = data.value.replace(rxp, '$1');
|
|
47418
|
-
}
|
|
47950
|
+
data.value = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_3__.unwrapMarkedTags)(data.value, mediaFakeTag, `data-${keyFake}`);
|
|
47419
47951
|
}).on('change afterInit afterSetMode changePlace', editor.async.debounce(()=>{
|
|
47420
47952
|
if (!editor.isDestructed && editor.getMode() !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
47421
|
-
(0,
|
|
47422
|
-
if (!(0,
|
|
47423
|
-
(0,
|
|
47953
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)(mediaBlocks.join(','), editor.editor).forEach((elm)=>{
|
|
47954
|
+
if (!(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, keyFake)) {
|
|
47955
|
+
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__.dataBind)(elm, keyFake, true);
|
|
47424
47956
|
wrap(elm);
|
|
47425
47957
|
}
|
|
47426
47958
|
});
|
|
@@ -48402,7 +48934,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
48402
48934
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
|
|
48403
48935
|
/* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4510);
|
|
48404
48936
|
/* harmony import */ var _core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27613);
|
|
48405
|
-
/* harmony import */ var
|
|
48937
|
+
/* harmony import */ var _core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76241);
|
|
48938
|
+
/* harmony import */ var _core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10830);
|
|
48406
48939
|
/*!
|
|
48407
48940
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
48408
48941
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -48412,11 +48945,14 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
48412
48945
|
|
|
48413
48946
|
|
|
48414
48947
|
|
|
48948
|
+
|
|
48415
48949
|
/**
|
|
48416
48950
|
* Remove special HTML comments
|
|
48417
48951
|
* @private
|
|
48418
48952
|
*/ function removeExtraFragments(html) {
|
|
48419
|
-
html =
|
|
48953
|
+
html = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_4__.removeTagsByPrefix)(html, [
|
|
48954
|
+
'<meta'
|
|
48955
|
+
]);
|
|
48420
48956
|
const start = html.search(/<!--StartFragment-->/i);
|
|
48421
48957
|
if (start !== -1) {
|
|
48422
48958
|
html = html.substring(start + 20);
|
|
@@ -48434,7 +48970,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
48434
48970
|
* paste bold
|
|
48435
48971
|
* @private
|
|
48436
48972
|
*/ function removeGoogleDocsWrapper(html) {
|
|
48437
|
-
|
|
48973
|
+
// A plain search: the wrapper check is left to the parsed document below
|
|
48974
|
+
if (!/docs-internal-guid-/i.test(html)) {
|
|
48438
48975
|
return html;
|
|
48439
48976
|
}
|
|
48440
48977
|
// An inert document: images don't load and handlers don't run
|
|
@@ -48489,7 +49026,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
48489
49026
|
return;
|
|
48490
49027
|
}
|
|
48491
49028
|
const dialog = jodit.confirm(`<div style="word-break: normal; white-space: normal">${jodit.i18n(msg)}</div>`, jodit.i18n(title));
|
|
48492
|
-
const buttons = buttonList.map(({ text, value })=>(0,
|
|
49029
|
+
const buttons = buttonList.map(({ text, value })=>(0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_5__.Button)(jodit, {
|
|
48493
49030
|
text,
|
|
48494
49031
|
name: text.toLowerCase(),
|
|
48495
49032
|
tabIndex: 0
|
|
@@ -48505,7 +49042,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.paste = {
|
|
|
48505
49042
|
}
|
|
48506
49043
|
jodit.e.fire('afterClosePasteDialog', dialog);
|
|
48507
49044
|
});
|
|
48508
|
-
const cancel = (0,
|
|
49045
|
+
const cancel = (0,_core_ui_button_button_button_js__WEBPACK_IMPORTED_MODULE_5__.Button)(jodit, {
|
|
48509
49046
|
text: 'Cancel',
|
|
48510
49047
|
tabIndex: 0
|
|
48511
49048
|
}).onAction(()=>{
|
|
@@ -50021,12 +50558,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
50021
50558
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
50022
50559
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
50023
50560
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21537);
|
|
50024
|
-
/* harmony import */ var
|
|
50025
|
-
/* harmony import */ var
|
|
50026
|
-
/* harmony import */ var
|
|
50027
|
-
/* harmony import */ var
|
|
50028
|
-
/* harmony import */ var
|
|
50029
|
-
/* harmony import */ var
|
|
50561
|
+
/* harmony import */ var _core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(76241);
|
|
50562
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
|
|
50563
|
+
/* harmony import */ var _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(20356);
|
|
50564
|
+
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45124);
|
|
50565
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67510);
|
|
50566
|
+
/* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61259);
|
|
50567
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(71675);
|
|
50030
50568
|
/*!
|
|
50031
50569
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
50032
50570
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -50049,6 +50587,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.resizer = {
|
|
|
50049
50587
|
|
|
50050
50588
|
|
|
50051
50589
|
|
|
50590
|
+
|
|
50052
50591
|
const keyBInd = '__jodit-resizer_binded';
|
|
50053
50592
|
/**
|
|
50054
50593
|
* Reads a plain pixel value out of a `width`/`height` attribute.
|
|
@@ -50066,7 +50605,7 @@ const keyBInd = '__jodit-resizer_binded';
|
|
|
50066
50605
|
* A video with no height of its own takes it from its width and its ratio,
|
|
50067
50606
|
* so resizing it keeps the ratio without setting a height.
|
|
50068
50607
|
*/ function heightFollowsWidth(element) {
|
|
50069
|
-
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'video') && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, 'height') && !(0,
|
|
50608
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(element, 'video') && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, 'height') && !(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(element, 'height');
|
|
50070
50609
|
}
|
|
50071
50610
|
const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
50072
50611
|
/**
|
|
@@ -50076,7 +50615,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50076
50615
|
*/ const EMBED_WRAPPER_STYLE = `${IFRAME_WRAPPER}{position:relative;display:block;user-select:none}` + `${IFRAME_WRAPPER} iframe{position:relative}` + `${IFRAME_WRAPPER}::after{position:absolute;z-index:1;display:block;background:transparent;content:'';cursor:pointer;inset:0}` + `${IFRAME_WRAPPER}[data-jodit-wrapper_active=true] iframe{z-index:2}` + `.jodit_lock ${IFRAME_WRAPPER}[data-jodit-wrapper_active=true] iframe{z-index:1}`;
|
|
50077
50616
|
/**
|
|
50078
50617
|
* The module creates a supporting frame for resizing of the elements img and table
|
|
50079
|
-
*/ class resizer extends
|
|
50618
|
+
*/ class resizer extends _core_plugin_plugin_js__WEBPACK_IMPORTED_MODULE_7__.Plugin {
|
|
50080
50619
|
/** @override */ afterInit(editor) {
|
|
50081
50620
|
// It goes in the editing document, so iframe mode has it whatever `iframeStyle` holds
|
|
50082
50621
|
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.getContainer)(editor, 'resizer', 'style', true).textContent = EMBED_WRAPPER_STYLE;
|
|
@@ -50093,10 +50632,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50093
50632
|
.on('keydown', this.onEditorKeyDown, {
|
|
50094
50633
|
top: true
|
|
50095
50634
|
}).on('afterGetValueFromEditor.resizer', (data)=>{
|
|
50096
|
-
|
|
50097
|
-
if (rgx.test(data.value)) {
|
|
50098
|
-
data.value = data.value.replace(rgx, '$1');
|
|
50099
|
-
}
|
|
50635
|
+
data.value = (0,_core_helpers_html_tag_scan_js__WEBPACK_IMPORTED_MODULE_5__.unwrapMarkedTags)(data.value, 'jodit', 'data-jodit_iframe_wrapper', (inner)=>/<iframe/i.test(inner));
|
|
50100
50636
|
});
|
|
50101
50637
|
this.addEventListeners();
|
|
50102
50638
|
this.__onChangeEditor();
|
|
@@ -50133,7 +50669,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50133
50669
|
return;
|
|
50134
50670
|
}
|
|
50135
50671
|
const width = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width');
|
|
50136
|
-
if (width && !(0,
|
|
50672
|
+
if (width && !(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(image, 'width')) {
|
|
50137
50673
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'width', width);
|
|
50138
50674
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(image, 'width', null);
|
|
50139
50675
|
}
|
|
@@ -50257,7 +50793,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50257
50793
|
__followCaret() {
|
|
50258
50794
|
const before = this.__keyDownRange;
|
|
50259
50795
|
this.__keyDownRange = null;
|
|
50260
|
-
if (!(0,
|
|
50796
|
+
if (!(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_8__.isMoved)(this.j, before)) {
|
|
50261
50797
|
return;
|
|
50262
50798
|
}
|
|
50263
50799
|
if (this.isShown && this.element && !this.j.s.range.intersectsNode(this.element)) {
|
|
@@ -50292,7 +50828,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50292
50828
|
if (!this.isResizeMode) {
|
|
50293
50829
|
// A click in the element's popup, or in a list it opens, works on
|
|
50294
50830
|
// the element, so it keeps its frame
|
|
50295
|
-
if ((e === null || e === void 0 ? void 0 : e.target) &&
|
|
50831
|
+
if ((e === null || e === void 0 ? void 0 : e.target) && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_9__.UIElement.closestElement(e.target, _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_10__.Popup)) {
|
|
50296
50832
|
return;
|
|
50297
50833
|
}
|
|
50298
50834
|
return this.hide();
|
|
@@ -50316,7 +50852,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50316
50852
|
if (changeAttrs) {
|
|
50317
50853
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(element, key, value);
|
|
50318
50854
|
}
|
|
50319
|
-
if (!changeAttrs || (0,
|
|
50855
|
+
if (!changeAttrs || (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(element, key)) {
|
|
50320
50856
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(element, key, value);
|
|
50321
50857
|
}
|
|
50322
50858
|
}
|
|
@@ -50382,7 +50918,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50382
50918
|
const width = element.offsetWidth || attrPixelSize(element, 'width');
|
|
50383
50919
|
const height = element.offsetHeight || attrPixelSize(element, 'height');
|
|
50384
50920
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, {
|
|
50385
|
-
display: (0,
|
|
50921
|
+
display: (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(element, 'display') === 'inline-block' ? 'inline-block' : 'block'
|
|
50386
50922
|
});
|
|
50387
50923
|
if (width) {
|
|
50388
50924
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(wrapper, 'width', width);
|
|
@@ -50519,7 +51055,7 @@ const IFRAME_WRAPPER = '[data-jodit_iframe_wrapper]';
|
|
|
50519
51055
|
}
|
|
50520
51056
|
if (this.element && this.rect) {
|
|
50521
51057
|
const workplacePosition = this.getWorkplacePosition();
|
|
50522
|
-
const pos = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.element, this.j, this.j.ed), left = parseInt((0,
|
|
51058
|
+
const pos = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.element, this.j, this.j.ed), left = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(this.rect, 'left') || '0', 10), top = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.cssInline)(this.rect, 'top') || '0', 10), w = this.rect.offsetWidth, h = this.rect.offsetHeight;
|
|
50523
51059
|
const newTop = pos.top - workplacePosition.top, newLeft = pos.left - workplacePosition.left;
|
|
50524
51060
|
if (top !== newTop || left !== newLeft || w !== this.element.offsetWidth || h !== this.element.offsetHeight) {
|
|
50525
51061
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.css)(this.rect, {
|