jodit-pro 4.18.14 → 4.18.17
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 +5 -5
- package/es2015/jodit.js +281 -78
- package/es2015/jodit.min.js +5 -5
- 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 +5 -5
- package/es2018/jodit.min.js +5 -5
- 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 +7 -7
- package/es2021/jodit.js +281 -78
- package/es2021/jodit.min.js +7 -7
- 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 +7 -7
- package/es2021.en/jodit.js +281 -78
- package/es2021.en/jodit.min.js +10 -10
- 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 +353 -79
- 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/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.18.
|
|
4
|
+
* Version: v4.18.17
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1405,7 +1405,8 @@ class Async {
|
|
|
1405
1405
|
this.__requestsIdle.forEach((key)=>this.cancelIdleCallback(key));
|
|
1406
1406
|
this.__requestsRaf.forEach((key)=>this.cancelAnimationFrame(key));
|
|
1407
1407
|
this.__controllers.forEach((controller)=>controller.abort());
|
|
1408
|
-
|
|
1408
|
+
// A labelled timer is kept under its label, so clear by the value
|
|
1409
|
+
this.timers.forEach((timer)=>(0,_helpers_async_index_js__WEBPACK_IMPORTED_MODULE_1__.clearTimeout)(timer));
|
|
1409
1410
|
this.timers.clear();
|
|
1410
1411
|
this.promisesRejections.forEach((reject)=>reject());
|
|
1411
1412
|
this.promisesRejections.clear();
|
|
@@ -1766,7 +1767,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1766
1767
|
* ```
|
|
1767
1768
|
* @packageDocumentation
|
|
1768
1769
|
* @module constants
|
|
1769
|
-
*/ const APP_VERSION = "4.18.
|
|
1770
|
+
*/ const APP_VERSION = "4.18.17";
|
|
1770
1771
|
// prettier-ignore
|
|
1771
1772
|
const ES = "es2021";
|
|
1772
1773
|
const IS_ES_MODERN = true;
|
|
@@ -7061,8 +7062,10 @@ function normalizeCssValue(key, value) {
|
|
|
7061
7062
|
* ancestor's top-left corner. The returned offset should be subtracted from
|
|
7062
7063
|
* the desired viewport coordinates before applying them.
|
|
7063
7064
|
*
|
|
7064
|
-
*
|
|
7065
|
-
*
|
|
7065
|
+
* Without such an ancestor the containing block is the layout viewport. Its
|
|
7066
|
+
* offset is `{ x: 0, y: 0 }` in most browsers, but WebKit measures client
|
|
7067
|
+
* rects from the visual viewport, so once the page is pinch-zoomed and panned
|
|
7068
|
+
* the layout viewport starts above and to the left of the client origin.
|
|
7066
7069
|
*/ function getFixedPositionOffset(elm) {
|
|
7067
7070
|
var _a;
|
|
7068
7071
|
const win = (_a = elm.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
@@ -7077,6 +7080,15 @@ function normalizeCssValue(key, value) {
|
|
|
7077
7080
|
}
|
|
7078
7081
|
node = node.parentElement;
|
|
7079
7082
|
}
|
|
7083
|
+
const vv = win === null || win === void 0 ? void 0 : win.visualViewport;
|
|
7084
|
+
// WebKit's `scrollX`/`scrollY` follow the visual viewport too (truncated),
|
|
7085
|
+
// where Blink's and Gecko's follow the layout viewport
|
|
7086
|
+
if (win && vv && (vv.offsetLeft || vv.offsetTop) && Math.abs(vv.pageLeft - win.scrollX) < 1 && Math.abs(vv.pageTop - win.scrollY) < 1) {
|
|
7087
|
+
return {
|
|
7088
|
+
x: -Math.round(vv.offsetLeft),
|
|
7089
|
+
y: -Math.round(vv.offsetTop)
|
|
7090
|
+
};
|
|
7091
|
+
}
|
|
7080
7092
|
return {
|
|
7081
7093
|
x: 0,
|
|
7082
7094
|
y: 0
|
|
@@ -12934,7 +12946,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12934
12946
|
/**
|
|
12935
12947
|
* Replaces `ul->ol` or `ol->ul`, apply styles to the list, or remove a list item from it
|
|
12936
12948
|
* @private
|
|
12937
|
-
*/ function toggleOrderedList(commitStyle, li, jodit, mode) {
|
|
12949
|
+
*/ function toggleOrderedList(commitStyle, li, jodit, mode, collapsed = false) {
|
|
12938
12950
|
if (!li) {
|
|
12939
12951
|
return mode;
|
|
12940
12952
|
}
|
|
@@ -12963,16 +12975,36 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
12963
12975
|
}
|
|
12964
12976
|
// ul => ol, ol => ul or ul => ul.class1
|
|
12965
12977
|
if (mode === _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE || isChangeMode || !isSameList) {
|
|
12966
|
-
|
|
12967
|
-
const
|
|
12978
|
+
// With just a caret, Word converts the whole list
|
|
12979
|
+
const items = collapsed && !isSameList ? Array.from(list.children).filter((item)=>_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(item)) : [
|
|
12980
|
+
li
|
|
12981
|
+
];
|
|
12982
|
+
let newList;
|
|
12983
|
+
for (const item of items){
|
|
12984
|
+
newList = keepNumbering(item, (itemList)=>(0,_wrap_list_js__WEBPACK_IMPORTED_MODULE_7__.wrapList)(commitStyle, unwrapList(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, itemList, item, jodit, commitStyle), jodit));
|
|
12985
|
+
}
|
|
12968
12986
|
hook(_constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE, newList, commitStyle);
|
|
12969
12987
|
return _constants_js__WEBPACK_IMPORTED_MODULE_6__.REPLACE;
|
|
12970
12988
|
}
|
|
12971
12989
|
}
|
|
12972
|
-
const wrapper = unwrapList((/* inlined export .UNWRAP */"unwrap"),
|
|
12990
|
+
const wrapper = keepNumbering(li, (itemList)=>unwrapList((/* inlined export .UNWRAP */"unwrap"), itemList, li, jodit, commitStyle));
|
|
12973
12991
|
hook((/* inlined export .UNWRAP */"unwrap"), wrapper, commitStyle);
|
|
12974
12992
|
return (/* inlined export .UNWRAP */"unwrap");
|
|
12975
12993
|
}
|
|
12994
|
+
/**
|
|
12995
|
+
* Takes `item` out of its list with `takeOut`, and carries a numbered list's
|
|
12996
|
+
* count on past it, as Word does: 1, a bullet, then 2
|
|
12997
|
+
*/ function keepNumbering(item, takeOut) {
|
|
12998
|
+
const list = item.parentElement;
|
|
12999
|
+
const rest = item.nextElementSibling;
|
|
13000
|
+
const next = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(list, 'ol') ? (parseInt(list.getAttribute('start') || '1', 10) || 1) + Array.from(list.children).indexOf(item) : 0;
|
|
13001
|
+
const result = takeOut(list);
|
|
13002
|
+
const restList = rest === null || rest === void 0 ? void 0 : rest.parentElement;
|
|
13003
|
+
if (next && _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(restList, 'ol')) {
|
|
13004
|
+
next > 1 ? restList.setAttribute('start', String(next)) : restList.removeAttribute('start');
|
|
13005
|
+
}
|
|
13006
|
+
return result;
|
|
13007
|
+
}
|
|
12976
13008
|
/**
|
|
12977
13009
|
* Other attributes, such as a class, still move the items into a new list,
|
|
12978
13010
|
* where the `beforeWrapList` hook can add markup to each of them
|
|
@@ -13733,7 +13765,7 @@ const transactions = {
|
|
|
13733
13765
|
exec (value) {
|
|
13734
13766
|
return {
|
|
13735
13767
|
...value,
|
|
13736
|
-
mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode),
|
|
13768
|
+
mode: (0,_api_index_js__WEBPACK_IMPORTED_MODULE_3__.toggleOrderedList)(value.style, value.element, value.jodit, value.mode, value.collapsed),
|
|
13737
13769
|
next: states.END
|
|
13738
13770
|
};
|
|
13739
13771
|
}
|
|
@@ -33377,12 +33409,13 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('about', _about_svg_js__W
|
|
|
33377
33409
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
33378
33410
|
|
|
33379
33411
|
/* unused harmony export addNewLine */
|
|
33380
|
-
/* harmony import */ var
|
|
33381
|
-
/* harmony import */ var
|
|
33382
|
-
/* harmony import */ var
|
|
33383
|
-
/* harmony import */ var
|
|
33384
|
-
/* harmony import */ var
|
|
33385
|
-
/* harmony import */ var
|
|
33412
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
33413
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
33414
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
33415
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
33416
|
+
/* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41180);
|
|
33417
|
+
/* harmony import */ var _modules_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41409);
|
|
33418
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4604);
|
|
33386
33419
|
/*!
|
|
33387
33420
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
33388
33421
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -33399,10 +33432,11 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('about', _about_svg_js__W
|
|
|
33399
33432
|
|
|
33400
33433
|
|
|
33401
33434
|
|
|
33435
|
+
|
|
33402
33436
|
const ns = 'addnewline';
|
|
33403
33437
|
/**
|
|
33404
33438
|
* Create helper for adding new paragraph(Jodit.defaultOptions.enter tag) before iframe, table or image
|
|
33405
|
-
*/ class addNewLine extends
|
|
33439
|
+
*/ class addNewLine extends _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
33406
33440
|
__show() {
|
|
33407
33441
|
if (this.j.o.readonly || this.j.isLocked) {
|
|
33408
33442
|
return;
|
|
@@ -33412,8 +33446,8 @@ const ns = 'addnewline';
|
|
|
33412
33446
|
return;
|
|
33413
33447
|
}
|
|
33414
33448
|
this.__isShown = true;
|
|
33415
|
-
|
|
33416
|
-
(0,
|
|
33449
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(this.j.container, this.__line);
|
|
33450
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(this.__line, 'width', this.j.container.clientWidth);
|
|
33417
33451
|
}
|
|
33418
33452
|
onLock(isLocked) {
|
|
33419
33453
|
if (isLocked && this.__isShown) {
|
|
@@ -33451,16 +33485,43 @@ const ns = 'addnewline';
|
|
|
33451
33485
|
editor.editor
|
|
33452
33486
|
], 'scroll' + '.' + ns, this.__hideForce).on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce).on(editor.editor, 'click' + '.' + ns, this.__hide).on(editor.container, 'mouseleave' + '.' + ns, this.__hide).on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
|
|
33453
33487
|
}
|
|
33488
|
+
/**
|
|
33489
|
+
* A paragraph holding only an embed has no place for the caret, so the
|
|
33490
|
+
* arrow keys can't get past one that ends the content, or before one that
|
|
33491
|
+
* starts it. When an arrow key leaves the caret where it was and there is
|
|
33492
|
+
* content beyond it, a new line goes there, as when the line is clicked.
|
|
33493
|
+
*/ onArrowKey(e) {
|
|
33494
|
+
const editor = this.j;
|
|
33495
|
+
const forward = e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT;
|
|
33496
|
+
if (!editor.o.addNewLine || editor.o.readonly || editor.isLocked || e.shiftKey || !(forward || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_UP || e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_LEFT) || !editor.s.isCollapsed()) {
|
|
33497
|
+
return;
|
|
33498
|
+
}
|
|
33499
|
+
const { startContainer, startOffset } = editor.s.range;
|
|
33500
|
+
// Once the browser has moved the caret, if it could. With a 0 timeout
|
|
33501
|
+
// Jodit would run this at once, before the browser moves it
|
|
33502
|
+
editor.async.setTimeout(()=>{
|
|
33503
|
+
const { range } = editor.s;
|
|
33504
|
+
const block = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.closest(startContainer, _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock, editor.editor);
|
|
33505
|
+
if (e.defaultPrevented || !editor.s.isInsideArea || !range.collapsed || range.startContainer !== startContainer || range.startOffset !== startOffset || !block || !_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.findNotEmptyNeighbor(block, !forward, editor.editor)) {
|
|
33506
|
+
return;
|
|
33507
|
+
}
|
|
33508
|
+
const p = editor.createInside.element(editor.o.enter);
|
|
33509
|
+
forward ? _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p) : _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
|
|
33510
|
+
editor.s.setCursorIn(p);
|
|
33511
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
|
|
33512
|
+
editor.synchronizeValues();
|
|
33513
|
+
}, 1);
|
|
33514
|
+
}
|
|
33454
33515
|
onDblClickEditor(e) {
|
|
33455
33516
|
const editor = this.j;
|
|
33456
33517
|
if (!editor.o.readonly && editor.o.addNewLineOnDBLClick && e.target === editor.editor && editor.s.isCollapsed()) {
|
|
33457
|
-
const editorBound = (0,
|
|
33518
|
+
const editorBound = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.offset)(editor.editor, editor, editor.ed);
|
|
33458
33519
|
const top = e.pageY - editor.ew.scrollX;
|
|
33459
33520
|
const p = editor.createInside.element(editor.o.enter);
|
|
33460
33521
|
if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
|
|
33461
|
-
|
|
33522
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
|
|
33462
33523
|
} else {
|
|
33463
|
-
|
|
33524
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p);
|
|
33464
33525
|
}
|
|
33465
33526
|
editor.s.setCursorIn(p);
|
|
33466
33527
|
editor.synchronizeValues();
|
|
@@ -33474,27 +33535,27 @@ const ns = 'addnewline';
|
|
|
33474
33535
|
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
33475
33536
|
// host, so the lookup must start from the shadow root
|
|
33476
33537
|
let currentElement = ((_a = editor.o.shadowRoot) !== null && _a !== void 0 ? _a : editor.ed).elementFromPoint(e.clientX, e.clientY);
|
|
33477
|
-
if (!
|
|
33538
|
+
if (!_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isHTMLElement(currentElement) || !_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isOrContains(editor.editor, currentElement)) {
|
|
33478
33539
|
return;
|
|
33479
33540
|
}
|
|
33480
33541
|
if (editor.editor !== currentElement && !this.__isMatchedTag(currentElement)) {
|
|
33481
|
-
currentElement =
|
|
33542
|
+
currentElement = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.closest(currentElement, this.__isMatchedTag, editor.editor);
|
|
33482
33543
|
}
|
|
33483
33544
|
if (!currentElement) {
|
|
33484
33545
|
this.__hide();
|
|
33485
33546
|
return;
|
|
33486
33547
|
}
|
|
33487
33548
|
if (this.__isMatchedTag(currentElement)) {
|
|
33488
|
-
const parentBox =
|
|
33549
|
+
const parentBox = _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.up(currentElement, _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock, editor.editor);
|
|
33489
33550
|
if (parentBox && parentBox !== editor.editor) {
|
|
33490
33551
|
currentElement = parentBox;
|
|
33491
33552
|
}
|
|
33492
33553
|
}
|
|
33493
|
-
const pos = (0,
|
|
33554
|
+
const pos = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(currentElement, this.j);
|
|
33494
33555
|
let top = false;
|
|
33495
33556
|
let { clientY, clientX } = e;
|
|
33496
33557
|
if (this.j.iframe) {
|
|
33497
|
-
const { top, left } = (0,
|
|
33558
|
+
const { top, left } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(this.j.iframe, this.j, true);
|
|
33498
33559
|
clientY += top;
|
|
33499
33560
|
clientX += left;
|
|
33500
33561
|
}
|
|
@@ -33507,8 +33568,8 @@ const ns = 'addnewline';
|
|
|
33507
33568
|
this.__isBeforeContent = false;
|
|
33508
33569
|
}
|
|
33509
33570
|
const isEditor = editor.editor === currentElement;
|
|
33510
|
-
if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !(0,
|
|
33511
|
-
(0,
|
|
33571
|
+
if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(this.__isBeforeContent ? _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prev : _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.next, currentElement, this.__canGetFocus, editor.editor))) {
|
|
33572
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_4__.css)(this.__line, 'top', top);
|
|
33512
33573
|
this.__current = currentElement;
|
|
33513
33574
|
this.__show();
|
|
33514
33575
|
this.__line.style.setProperty('--jd-anl-handle-offset', clientX - pos.left - 10 + 'px');
|
|
@@ -33520,7 +33581,7 @@ const ns = 'addnewline';
|
|
|
33520
33581
|
/** @override */ beforeDestruct() {
|
|
33521
33582
|
this.j.async.clearTimeout(this.__timeout);
|
|
33522
33583
|
this.j.e.off(this.__line).off('changePlace', this.__addEventListeners);
|
|
33523
|
-
|
|
33584
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.safeRemove(this.__line);
|
|
33524
33585
|
this.j.e.off([
|
|
33525
33586
|
this.j.ow,
|
|
33526
33587
|
this.j.ew,
|
|
@@ -33529,7 +33590,7 @@ const ns = 'addnewline';
|
|
|
33529
33590
|
}
|
|
33530
33591
|
constructor(){
|
|
33531
33592
|
super(...arguments);
|
|
33532
|
-
this.__line = this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n('Break')}" class="jodit-add-new-line"><span>${
|
|
33593
|
+
this.__line = this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n('Break')}" class="jodit-add-new-line"><span>${_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Icon.get('enter')}</span></div>`);
|
|
33533
33594
|
this.__isMatchedTag = (node)=>Boolean(node && this.j.o.addNewLineTagsTriggers.includes(node.nodeName.toLowerCase()));
|
|
33534
33595
|
this.__isBeforeContent = false;
|
|
33535
33596
|
this.__lineInFocus = false;
|
|
@@ -33541,26 +33602,26 @@ const ns = 'addnewline';
|
|
|
33541
33602
|
this.__isShown = false;
|
|
33542
33603
|
this.j.async.clearTimeout(this.__timeout);
|
|
33543
33604
|
this.__lineInFocus = false;
|
|
33544
|
-
|
|
33605
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.safeRemove(this.__line);
|
|
33545
33606
|
this.__line.style.setProperty('--jd-anl-handle-offset', '0');
|
|
33546
33607
|
};
|
|
33547
33608
|
this.__canGetFocus = (elm)=>{
|
|
33548
|
-
return elm != null &&
|
|
33609
|
+
return elm != null && _modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.isBlock(elm) && !/^(img|table|iframe|hr)$/i.test(elm.nodeName);
|
|
33549
33610
|
};
|
|
33550
33611
|
this.__onClickLine = (e)=>{
|
|
33551
33612
|
const editor = this.j;
|
|
33552
33613
|
const p = editor.createInside.element(editor.o.enter);
|
|
33553
33614
|
if (this.__isBeforeContent && this.__current && this.__current.parentNode) {
|
|
33554
33615
|
if (this.__current === editor.editor) {
|
|
33555
|
-
|
|
33616
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.prepend(editor.editor, p);
|
|
33556
33617
|
} else {
|
|
33557
|
-
|
|
33618
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.before(this.__current, p);
|
|
33558
33619
|
}
|
|
33559
33620
|
} else {
|
|
33560
|
-
|
|
33621
|
+
_modules_index_js__WEBPACK_IMPORTED_MODULE_5__.Dom.append(editor.editor, p);
|
|
33561
33622
|
}
|
|
33562
33623
|
editor.s.setCursorIn(p);
|
|
33563
|
-
(0,
|
|
33624
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(p, editor.editor, editor.ed);
|
|
33564
33625
|
editor.synchronizeValues();
|
|
33565
33626
|
this.__hideForce();
|
|
33566
33627
|
e.preventDefault();
|
|
@@ -33568,18 +33629,21 @@ const ns = 'addnewline';
|
|
|
33568
33629
|
}
|
|
33569
33630
|
}
|
|
33570
33631
|
__decorate([
|
|
33571
|
-
(0,
|
|
33632
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':lock')
|
|
33572
33633
|
], addNewLine.prototype, "onLock", null);
|
|
33573
33634
|
__decorate([
|
|
33574
|
-
|
|
33635
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
33575
33636
|
], addNewLine.prototype, "__hide", null);
|
|
33576
33637
|
__decorate([
|
|
33577
|
-
(0,
|
|
33638
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':keydown')
|
|
33639
|
+
], addNewLine.prototype, "onArrowKey", null);
|
|
33640
|
+
__decorate([
|
|
33641
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':dblclick')
|
|
33578
33642
|
], addNewLine.prototype, "onDblClickEditor", null);
|
|
33579
33643
|
__decorate([
|
|
33580
|
-
(0,
|
|
33644
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.throttle)((ctx)=>ctx.defaultTimeout)
|
|
33581
33645
|
], addNewLine.prototype, "__onMouseMove", null);
|
|
33582
|
-
|
|
33646
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('addNewLine', addNewLine);
|
|
33583
33647
|
|
|
33584
33648
|
|
|
33585
33649
|
/***/ }),
|
|
@@ -34311,6 +34375,7 @@ UiAiAssistant = __decorate([
|
|
|
34311
34375
|
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32496);
|
|
34312
34376
|
/* harmony import */ var _cases_check_not_collapsed_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11338);
|
|
34313
34377
|
/* harmony import */ var _cases_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14630);
|
|
34378
|
+
/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63785);
|
|
34314
34379
|
/*!
|
|
34315
34380
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
34316
34381
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -34324,6 +34389,7 @@ UiAiAssistant = __decorate([
|
|
|
34324
34389
|
|
|
34325
34390
|
|
|
34326
34391
|
|
|
34392
|
+
|
|
34327
34393
|
class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugin {
|
|
34328
34394
|
afterInit(jodit) {
|
|
34329
34395
|
jodit.registerCommand('deleteButton', {
|
|
@@ -34401,19 +34467,53 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__.Plugi
|
|
|
34401
34467
|
throw e;
|
|
34402
34468
|
} finally{
|
|
34403
34469
|
jodit.e.fire('backSpaceAfterDelete', backspace, fakeNode);
|
|
34470
|
+
this.moveCaretToTextBefore(fakeNode);
|
|
34404
34471
|
this.safeRemoveEmptyNode(fakeNode);
|
|
34405
34472
|
}
|
|
34406
34473
|
return false;
|
|
34407
34474
|
}
|
|
34475
|
+
/**
|
|
34476
|
+
* The browser types at the end of the text before the caret on its line,
|
|
34477
|
+
* in that text's formatting, but not inside a link. Moving the caret there
|
|
34478
|
+
* too makes a paste and the toolbar agree with what's typed:
|
|
34479
|
+
* `<p>one</p><p><b>|two</b></p>` joins to `<p>one|<b>two</b></p>`
|
|
34480
|
+
*/ moveCaretToTextBefore(fakeNode) {
|
|
34481
|
+
var _a, _b;
|
|
34482
|
+
const { jodit } = this;
|
|
34483
|
+
const { range } = jodit.s;
|
|
34484
|
+
// A case may have merged the fake node away (#1722)
|
|
34485
|
+
if (!fakeNode.parentNode) {
|
|
34486
|
+
return;
|
|
34487
|
+
}
|
|
34488
|
+
const around = jodit.ed.createRange();
|
|
34489
|
+
around.selectNode(fakeNode);
|
|
34490
|
+
if (!range.collapsed || !around.isPointInRange(range.startContainer, range.startOffset)) {
|
|
34491
|
+
return;
|
|
34492
|
+
}
|
|
34493
|
+
const text = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_9__.findMostNestedNeighbor)(fakeNode, false, jodit.editor, true);
|
|
34494
|
+
const link = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, 'a', jodit.editor);
|
|
34495
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(text) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(text, jodit.editor) || link && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(link, fakeNode) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(text, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor) !== _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fakeNode, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) {
|
|
34496
|
+
return;
|
|
34497
|
+
}
|
|
34498
|
+
range.setStart(text, (_b = (_a = text.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
34499
|
+
range.collapse(true);
|
|
34500
|
+
jodit.s.selectRange(range);
|
|
34501
|
+
}
|
|
34408
34502
|
/**
|
|
34409
34503
|
* Remove node and replace cursor position out of it
|
|
34410
34504
|
*/ safeRemoveEmptyNode(fakeNode) {
|
|
34411
|
-
var _a, _b;
|
|
34505
|
+
var _a, _b, _c;
|
|
34412
34506
|
const { range } = this.j.s;
|
|
34507
|
+
// wrap-nodes normalizes the line it wraps, which can merge the text
|
|
34508
|
+
// after the fake node into it: remove only the fake node's own space
|
|
34509
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(fakeNode) && fakeNode.nodeValue !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE && ((_a = fakeNode.nodeValue) === null || _a === void 0 ? void 0 : _a.startsWith(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE))) {
|
|
34510
|
+
fakeNode.deleteData(0, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE.length);
|
|
34511
|
+
return;
|
|
34512
|
+
}
|
|
34413
34513
|
if (range.startContainer === fakeNode) {
|
|
34414
34514
|
if (fakeNode.previousSibling) {
|
|
34415
34515
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(fakeNode.previousSibling)) {
|
|
34416
|
-
range.setStart(fakeNode.previousSibling, (
|
|
34516
|
+
range.setStart(fakeNode.previousSibling, (_c = (_b = fakeNode.previousSibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0);
|
|
34417
34517
|
} else {
|
|
34418
34518
|
range.setStartAfter(fakeNode.previousSibling);
|
|
34419
34519
|
}
|
|
@@ -34478,6 +34578,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34478
34578
|
return false;
|
|
34479
34579
|
}
|
|
34480
34580
|
const sibling = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(mainClosestBox, backspace);
|
|
34581
|
+
if (moveInlinesInside(jodit, fakeNode, sibling)) {
|
|
34582
|
+
return joinNeighbors(jodit, fakeNode, backspace, moved);
|
|
34583
|
+
}
|
|
34481
34584
|
// A line break before the cursor is a single unit: remove it instead of
|
|
34482
34585
|
// merging the current element into the (void) `<br>`, which used to move
|
|
34483
34586
|
// the whole element's content into the `<br>` and delete it (#1282).
|
|
@@ -34492,6 +34595,10 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34492
34595
|
jodit.s.setCursorBefore(fakeNode);
|
|
34493
34596
|
return true;
|
|
34494
34597
|
}
|
|
34598
|
+
// A non-editable sibling is removed by remove-not-editable, never joined
|
|
34599
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(sibling) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(sibling, jodit.editor)) {
|
|
34600
|
+
return false;
|
|
34601
|
+
}
|
|
34495
34602
|
const box = findCaretBox(fakeNode, mainClosestBox);
|
|
34496
34603
|
// One pass only: the line now sits beside the next one, so the
|
|
34497
34604
|
// cases below join them. The DOM has changed either way
|
|
@@ -34520,6 +34627,60 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
34520
34627
|
}
|
|
34521
34628
|
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(block) && block.parentElement ? block.parentElement : block;
|
|
34522
34629
|
}
|
|
34630
|
+
/**
|
|
34631
|
+
* With an inline element round the caret's line or the one it joins moved
|
|
34632
|
+
* inside its blocks, the cases join the lines as they join any two, and its
|
|
34633
|
+
* styles stay with its text. One round both lines is left as it is.
|
|
34634
|
+
*/ function moveInlinesInside(jodit, fakeNode, sibling) {
|
|
34635
|
+
if (!sibling) {
|
|
34636
|
+
return false;
|
|
34637
|
+
}
|
|
34638
|
+
const around = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.furthest(fakeNode, (node)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, sibling), jodit.editor);
|
|
34639
|
+
return moveInlineInside(around, jodit.editor) || moveInlineInside(sibling, jodit.editor);
|
|
34640
|
+
}
|
|
34641
|
+
/**
|
|
34642
|
+
* Old content can have an inline element round blocks. This moves it inside
|
|
34643
|
+
* them, and gives the text, images and line breaks beside them a copy of
|
|
34644
|
+
* their own: `<span style="…"><p>one</p><br><p>two</p></span>` becomes
|
|
34645
|
+
* `<p><span style="…">one</span></p><span style="…"><br></span><p><span style="…">two</span></p>`
|
|
34646
|
+
*/ function moveInlineInside(node, root) {
|
|
34647
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node)) {
|
|
34648
|
+
return false;
|
|
34649
|
+
}
|
|
34650
|
+
// Embedded content, such as the `<iframe>` in a video's wrapper, counts
|
|
34651
|
+
// as a block in `Dom.isBlock`, but stays with the text beside it
|
|
34652
|
+
const isBlock = (child)=>_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(child) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS);
|
|
34653
|
+
// The inner one first: `<span><strong><p>one</p></strong></span>`
|
|
34654
|
+
Array.from(node.childNodes).forEach((child)=>moveInlineInside(child, root));
|
|
34655
|
+
const children = Array.from(node.childNodes);
|
|
34656
|
+
if (!children.some(isBlock)) {
|
|
34657
|
+
return false;
|
|
34658
|
+
}
|
|
34659
|
+
let run = null;
|
|
34660
|
+
for (const child of children){
|
|
34661
|
+
if (!isBlock(child)) {
|
|
34662
|
+
// Blank text between blocks stays where it is
|
|
34663
|
+
if (!run && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child)) {
|
|
34664
|
+
run = node.cloneNode(false);
|
|
34665
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.before(child, run);
|
|
34666
|
+
}
|
|
34667
|
+
run && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(run, child);
|
|
34668
|
+
continue;
|
|
34669
|
+
}
|
|
34670
|
+
run = null;
|
|
34671
|
+
// Nothing goes inside a rule or a non-editable block
|
|
34672
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(child, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(child, root)) {
|
|
34673
|
+
continue;
|
|
34674
|
+
}
|
|
34675
|
+
const inner = node.cloneNode(false);
|
|
34676
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(child, inner);
|
|
34677
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(child, inner);
|
|
34678
|
+
// A list or a table: on down to its items or cells
|
|
34679
|
+
moveInlineInside(inner, root);
|
|
34680
|
+
}
|
|
34681
|
+
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.unwrap(node);
|
|
34682
|
+
return true;
|
|
34683
|
+
}
|
|
34523
34684
|
/**
|
|
34524
34685
|
* The innermost block on the sibling's edge facing the caret, so the
|
|
34525
34686
|
* content is joined to text: `<div><p>one</p></div><p>|two</p>` gives
|
|
@@ -34871,7 +35032,9 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode, stopBeforeSpace = fal
|
|
|
34871
35032
|
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(sibling)){
|
|
34872
35033
|
sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
|
|
34873
35034
|
}
|
|
34874
|
-
|
|
35035
|
+
// A block inside an inline element, such as the `<p>` in
|
|
35036
|
+
// `<span><p>…</p></span>`, isn't a char: the join cases handle it
|
|
35037
|
+
if (!sibling || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(sibling)) {
|
|
34875
35038
|
break;
|
|
34876
35039
|
}
|
|
34877
35040
|
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
@@ -35019,6 +35182,7 @@ function isSpace(char) {
|
|
|
35019
35182
|
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
|
|
35020
35183
|
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
|
|
35021
35184
|
/* harmony import */ var _core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45124);
|
|
35185
|
+
/* harmony import */ var _check_join_neighbors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62845);
|
|
35022
35186
|
/*!
|
|
35023
35187
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
35024
35188
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -35026,23 +35190,48 @@ function isSpace(char) {
|
|
|
35026
35190
|
*/
|
|
35027
35191
|
|
|
35028
35192
|
|
|
35193
|
+
|
|
35029
35194
|
/**
|
|
35030
|
-
* Checks if a non-editable element can be deleted
|
|
35195
|
+
* Checks if a non-editable element can be deleted. A non-editable block goes
|
|
35196
|
+
* whole, and the lines either side of it then join, as the spec's tests do:
|
|
35197
|
+
* `<ul><li>one|</li></ul><div contenteditable="false">x</div><p>two</p>`
|
|
35198
|
+
* gives `<ul><li>one|two</li></ul>`
|
|
35031
35199
|
* @private
|
|
35032
35200
|
*/ function checkRemoveContentNotEditable(jodit, fakeNode, backspace) {
|
|
35033
|
-
let
|
|
35034
|
-
|
|
35035
|
-
|
|
35036
|
-
|
|
35037
|
-
|
|
35038
|
-
|
|
35039
|
-
|
|
35040
|
-
|
|
35041
|
-
(
|
|
35201
|
+
let node = fakeNode;
|
|
35202
|
+
let neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(node, backspace);
|
|
35203
|
+
// Past the edges of the blocks the caret is at, but not into a table cell
|
|
35204
|
+
while(!neighbor && node.parentElement && node.parentElement !== jodit.editor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isCell(node.parentElement)){
|
|
35205
|
+
node = node.parentElement;
|
|
35206
|
+
neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.findSibling(node, backspace);
|
|
35207
|
+
// At the start of a list item, Backspace takes the bullet off first,
|
|
35208
|
+
// unless the item before it is a non-editable one to remove
|
|
35209
|
+
if (backspace && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(node) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(neighbor) && isNotEditable(jodit, neighbor))) {
|
|
35210
|
+
return false;
|
|
35211
|
+
}
|
|
35212
|
+
}
|
|
35213
|
+
if (isNotEditable(jodit, neighbor)) {
|
|
35214
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock(neighbor)) {
|
|
35215
|
+
// Backspace after a removed list item leaves the items apart: the
|
|
35216
|
+
// next press takes the bullet off, as for any later item
|
|
35217
|
+
const joinLines = !(backspace && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isLeaf(neighbor));
|
|
35218
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(neighbor);
|
|
35219
|
+
if (joinLines) {
|
|
35220
|
+
(0,_check_join_neighbors_js__WEBPACK_IMPORTED_MODULE_3__.checkJoinNeighbors)(jodit, fakeNode, backspace);
|
|
35221
|
+
}
|
|
35222
|
+
} else {
|
|
35223
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.after, neighbor, fakeNode);
|
|
35224
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(neighbor);
|
|
35225
|
+
(0,_core_selection_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.moveNodeInsideStart)(jodit, fakeNode, backspace);
|
|
35226
|
+
}
|
|
35227
|
+
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.call)(backspace ? jodit.s.setCursorBefore : jodit.s.setCursorAfter, fakeNode);
|
|
35042
35228
|
return true;
|
|
35043
35229
|
}
|
|
35044
35230
|
return false;
|
|
35045
35231
|
}
|
|
35232
|
+
function isNotEditable(jodit, node) {
|
|
35233
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isContentEditable(node, jodit.editor);
|
|
35234
|
+
}
|
|
35046
35235
|
|
|
35047
35236
|
|
|
35048
35237
|
/***/ }),
|
|
@@ -55774,12 +55963,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
|
|
|
55774
55963
|
/***/ 72253:
|
|
55775
55964
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
55776
55965
|
|
|
55777
|
-
/* harmony import */ var
|
|
55778
|
-
/* harmony import */ var
|
|
55779
|
-
/* harmony import */ var
|
|
55780
|
-
/* harmony import */ var
|
|
55781
|
-
/* harmony import */ var
|
|
55782
|
-
/* harmony import */ var
|
|
55966
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
55967
|
+
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
55968
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22732);
|
|
55969
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
55970
|
+
/* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70799);
|
|
55971
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
55972
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96967);
|
|
55783
55973
|
/*!
|
|
55784
55974
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
55785
55975
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -55796,9 +55986,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
|
|
|
55796
55986
|
|
|
55797
55987
|
|
|
55798
55988
|
|
|
55989
|
+
|
|
55799
55990
|
/**
|
|
55800
55991
|
* Wrap single text nodes in block wrapper
|
|
55801
|
-
*/ class wrapNodes extends
|
|
55992
|
+
*/ class wrapNodes extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin {
|
|
55802
55993
|
/** @override **/ afterInit(jodit) {
|
|
55803
55994
|
if (jodit.o.enter.toLowerCase() === 'br') {
|
|
55804
55995
|
return;
|
|
@@ -55827,10 +56018,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
|
|
|
55827
56018
|
}
|
|
55828
56019
|
isChanged = true;
|
|
55829
56020
|
const box = jodit.createInside.element(jodit.o.enter);
|
|
55830
|
-
|
|
55831
|
-
|
|
56021
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.before(child, box);
|
|
56022
|
+
// `exclude` keeps a <br> from starting a box, but one between loose lines stays with them
|
|
56023
|
+
while(child && (this.isSuitable(child) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(child, 'br'))){
|
|
55832
56024
|
const next = child.nextSibling;
|
|
55833
|
-
|
|
56025
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, child);
|
|
55834
56026
|
child = next;
|
|
55835
56027
|
}
|
|
55836
56028
|
box.normalize();
|
|
@@ -55854,8 +56046,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
|
|
|
55854
56046
|
}
|
|
55855
56047
|
const box = jodit.createInside.element(jodit.o.enter);
|
|
55856
56048
|
const br = jodit.createInside.element('br');
|
|
55857
|
-
|
|
55858
|
-
|
|
56049
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(box, br);
|
|
56050
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(jodit.editor, box);
|
|
55859
56051
|
if (jodit.s.isFocused() || jodit.e.current === 'backSpaceAfterDelete') {
|
|
55860
56052
|
jodit.s.setCursorBefore(br);
|
|
55861
56053
|
}
|
|
@@ -55867,32 +56059,43 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.wrapNodes = {
|
|
|
55867
56059
|
* Found Node which should be wrapped
|
|
55868
56060
|
*/ this.isSuitableStart = (n)=>{
|
|
55869
56061
|
var _a;
|
|
55870
|
-
return
|
|
56062
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(n) && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__.isString)(n.nodeValue) && (/[^\s]/.test(n.nodeValue) || ((_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === n && this.isSuitable(n.nextSibling)) || this.isNotWrapped(n) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTemporary(n);
|
|
55871
56063
|
};
|
|
55872
56064
|
/**
|
|
55873
56065
|
* Node should add in a block element
|
|
55874
|
-
*/ this.isSuitable = (n)=>
|
|
56066
|
+
*/ this.isSuitable = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isText(n) || this.isNotWrapped(n);
|
|
55875
56067
|
/**
|
|
55876
56068
|
* Some element which needs to append in block
|
|
55877
|
-
*/ this.isNotWrapped = (n)=>
|
|
56069
|
+
*/ this.isNotWrapped = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(n) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(n) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(n, this.j.o.wrapNodes.exclude) || holdsBlock(n));
|
|
55878
56070
|
}
|
|
55879
56071
|
}
|
|
55880
56072
|
__decorate([
|
|
55881
|
-
|
|
56073
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
55882
56074
|
], wrapNodes.prototype, "postProcessSetEditorValue", null);
|
|
55883
56075
|
__decorate([
|
|
55884
|
-
|
|
56076
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
55885
56077
|
], wrapNodes.prototype, "preprocessInput", null);
|
|
56078
|
+
/**
|
|
56079
|
+
* A block can't go in a paragraph, so neither can an element that holds one,
|
|
56080
|
+
* such as a `<span>` round a `<p>`. Embedded content such as an `<iframe>` can.
|
|
56081
|
+
*/ function holdsBlock(elm) {
|
|
56082
|
+
for (const node of _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.eachGen(elm)){
|
|
56083
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(node) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(node, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NO_EMPTY_TAGS)) {
|
|
56084
|
+
return true;
|
|
56085
|
+
}
|
|
56086
|
+
}
|
|
56087
|
+
return false;
|
|
56088
|
+
}
|
|
55886
56089
|
function checkAloneListLeaf(child, jodit) {
|
|
55887
56090
|
let result = child;
|
|
55888
56091
|
let next = child;
|
|
55889
56092
|
do {
|
|
55890
|
-
if (
|
|
55891
|
-
const nextChild =
|
|
55892
|
-
if (
|
|
55893
|
-
|
|
56093
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isElement(next) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isLeaf(next) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isList(next.parentElement)) {
|
|
56094
|
+
const nextChild = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.findNotEmptySibling(next, false);
|
|
56095
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(result, 'ul')) {
|
|
56096
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(result, next);
|
|
55894
56097
|
} else {
|
|
55895
|
-
result =
|
|
56098
|
+
result = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_2__.Dom.wrap(next, 'ul', jodit.createInside);
|
|
55896
56099
|
}
|
|
55897
56100
|
next = nextChild;
|
|
55898
56101
|
} else {
|
|
@@ -55901,7 +56104,7 @@ function checkAloneListLeaf(child, jodit) {
|
|
|
55901
56104
|
}while (next)
|
|
55902
56105
|
return result;
|
|
55903
56106
|
}
|
|
55904
|
-
|
|
56107
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('wrapNodes', wrapNodes);
|
|
55905
56108
|
|
|
55906
56109
|
|
|
55907
56110
|
/***/ }),
|