@aquera/nile-elements 2.0.15 → 2.0.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/README.md +6 -0
- package/demo/nxtgen-classes.css +5 -5
- package/demo/nxtgen-dark.css +16 -16
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +5 -5
- package/demo/nxtgen.css +5 -5
- package/demo/utilities.css +2 -2
- package/demo/variables.css +2 -2
- package/dist/{index-f6944844.cjs.js → index-0c0c869d.cjs.js} +2 -2
- package/dist/{index-f6944844.cjs.js.map → index-0c0c869d.cjs.js.map} +1 -1
- package/dist/{index-403841c7.cjs.js → index-129ef6fb.cjs.js} +3 -3
- package/dist/{index-403841c7.cjs.js.map → index-129ef6fb.cjs.js.map} +1 -1
- package/dist/{index-1faa963c.esm.js → index-36f2a6b5.esm.js} +1 -1
- package/dist/index-4df50481.esm.js +1 -0
- package/dist/index-5d34cff1.esm.js +1 -0
- package/dist/index-7ae95edd.cjs.js +2 -0
- package/dist/{index-3ca67627.cjs.js.map → index-7ae95edd.cjs.js.map} +1 -1
- package/dist/index-7ca72b78.esm.js +1 -0
- package/dist/index-bbe23ad8.cjs.js +2 -0
- package/dist/index-bbe23ad8.cjs.js.map +1 -0
- package/dist/index-ccc6a799.cjs.js +5 -0
- package/dist/index-ccc6a799.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +124 -72
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +2 -2
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js +1 -1
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-context-menu/index.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-submenu/index.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.esm.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/portal-manager.cjs.js +1 -1
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-segmented-progress-bar/index.cjs.js +1 -1
- package/dist/nile-segmented-progress-bar/nile-segmented-progress-bar.cjs.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/portal-manager.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/email-css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/email-css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-css.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +45 -4
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +5 -5
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +3 -3
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +3 -3
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +9 -9
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +4 -4
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +23 -12
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +7 -7
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js +2 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/email-css.d.ts +14 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-css.js +140 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.js +1045 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.d.ts +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.js +93 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.d.ts +2 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.js +24 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +4 -1
- package/dist/src/nile-wysiwyg-editor/engine/index.js +3 -1
- package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +0 -5
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +19 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +3 -2
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +4 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +56 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +27 -6
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +30 -7
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +46 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +9 -1
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +730 -7
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +3 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js +215 -34
- package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +3 -1
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +12 -4
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js +18 -8
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.js +287 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +45 -4
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +23 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +113 -15
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +213 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +14 -3
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/package.json +1 -1
- package/src/nile-lite-tooltip/nile-lite-tooltip.css.ts +1 -1
- package/src/nile-tooltip/nile-tooltip.css.ts +1 -1
- package/src/nile-wysiwyg-editor/engine/create-state.ts +7 -0
- package/src/nile-wysiwyg-editor/engine/email-css.ts +136 -0
- package/src/nile-wysiwyg-editor/engine/email-fidelity.test.ts +1347 -0
- package/src/nile-wysiwyg-editor/engine/email-render.ts +99 -0
- package/src/nile-wysiwyg-editor/engine/html-detect.ts +26 -0
- package/src/nile-wysiwyg-editor/engine/index.ts +10 -1
- package/src/nile-wysiwyg-editor/engine/inputrules.ts +18 -1
- package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +3 -2
- package/src/nile-wysiwyg-editor/engine/plugins/link.ts +58 -2
- package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +31 -8
- package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +29 -7
- package/src/nile-wysiwyg-editor/engine/pm.test.ts +73 -0
- package/src/nile-wysiwyg-editor/engine/sanitize.ts +729 -7
- package/src/nile-wysiwyg-editor/engine/schema.ts +206 -33
- package/src/nile-wysiwyg-editor/engine/selection-state.ts +3 -1
- package/src/nile-wysiwyg-editor/engine/serializer.ts +30 -8
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.ts +357 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +45 -4
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +258 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +119 -12
- package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/embed-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/embed-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/find-replace.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/image-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/image-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/insert-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/link-editor.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/math-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/source-view.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/special-chars.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/suggest-list.ts +14 -3
- package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/table-menu.ts +1 -1
- package/vscode-html-custom-data.json +15 -1
- package/web-test-runner.config.mjs +4 -0
- package/dist/index-3ca67627.cjs.js +0 -2
- package/dist/index-6f3fa4ab.esm.js +0 -1
- package/dist/index-7b1c9857.esm.js +0 -1
- package/dist/index-89c520e9.cjs.js +0 -5
- package/dist/index-89c520e9.cjs.js.map +0 -1
- package/dist/index-ba47645d.esm.js +0 -1
- package/dist/index-c3210a9c.cjs.js +0 -2
- package/dist/index-c3210a9c.cjs.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
5
5
|
import { TextSelection } from 'prosemirror-state';
|
|
6
6
|
import NileElement from '../internal/nile-element';
|
|
7
7
|
import { styles } from './nile-wysiwyg-editor.css';
|
|
8
|
-
import { defaultSchema, createEditorState, computeToolbarState, htmlToDoc, htmlToSlice, docToHtml, docToText, docToMarkdown, markdownToHtml, docToJson, jsonToDoc, isDocEmpty, sanitizeHtml, getCommand, getMarkRange, flattenToSingleParagraph, imageUploadKey, findUploadPos, countWords, TaskItemView, ImageView, FigureView, EmbedView, StyleBlockView, MathView, isOfficeHtml, cleanOfficeHtml, toInlineStyledHtml, buildWordDocument, buildPrintDocument, isFormatPainterArmed, armFormatPainter, disarmFormatPainter, applyFormatPainter, getFindState, searchTr, findStepTr, clearFindTr, replaceActiveTr, replaceAllTr, } from './engine';
|
|
8
|
+
import { defaultSchema, createEditorState, computeToolbarState, htmlToDoc, htmlToSlice, docToHtml, docToText, docToMarkdown, markdownToHtml, docToJson, jsonToDoc, isDocEmpty, sanitizeHtml, relocateEmailContainers, getCommand, getMarkRange, flattenToSingleParagraph, imageUploadKey, findUploadPos, countWords, TaskItemView, ImageView, FigureView, EmbedView, StyleBlockView, MathView, isOfficeHtml, cleanOfficeHtml, toInlineStyledHtml, buildWordDocument, buildPrintDocument, isFormatPainterArmed, armFormatPainter, disarmFormatPainter, applyFormatPainter, getFindState, searchTr, findStepTr, clearFindTr, replaceActiveTr, replaceAllTr, normalizeEmailAllowedStyles, parseAllowedStylesAttr, } from './engine';
|
|
9
9
|
import { selectedImageInfo } from './engine/commands';
|
|
10
10
|
import { DEFAULT_TOOLBAR } from './types';
|
|
11
11
|
import { EMOJI } from './emoji';
|
|
@@ -126,6 +126,8 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
126
126
|
this.noSlashCommands = false;
|
|
127
127
|
/** Disables the ":" emoji picker. */
|
|
128
128
|
this.noEmoji = false;
|
|
129
|
+
/** Hides the floating table toolbar; with `email-fidelity` it also hides in layout tables. */
|
|
130
|
+
this.noTableMenu = false;
|
|
129
131
|
/** Maximum character count; further input is rejected. 0 = unlimited. */
|
|
130
132
|
this.maxLength = 0;
|
|
131
133
|
/** Always show the word/character counter footer (implied by maxlength). */
|
|
@@ -144,6 +146,10 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
144
146
|
this.pasteAsPlainText = false;
|
|
145
147
|
/** Disables Markdown detection on plain-text pastes. */
|
|
146
148
|
this.noMarkdownPaste = false;
|
|
149
|
+
/** Opt-in mode for table-based email HTML; off by default (output unchanged). */
|
|
150
|
+
this.emailFidelity = false;
|
|
151
|
+
/** Extra inline CSS to keep per tag under `email-fidelity`: `{ td: ['letter-spacing'] }` or `"td: letter-spacing"`. */
|
|
152
|
+
this.allowedStyles = {};
|
|
147
153
|
/** Disables typography autocorrect (smart quotes, dashes, (c) → ©). */
|
|
148
154
|
this.noTextTransform = false;
|
|
149
155
|
/** Expands the editor to fill the viewport. Esc exits. */
|
|
@@ -155,6 +161,9 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
155
161
|
this.counter = { words: 0, characters: 0 };
|
|
156
162
|
/** Which list the shared insert-menu is showing, if open. */
|
|
157
163
|
this.insertMenuMode = null;
|
|
164
|
+
/** Validated `allowedStyles`, recomputed once per config change (so the
|
|
165
|
+
* drop warnings fire once, not on every paste). */
|
|
166
|
+
this.normalizedAllowedStyles = new Map();
|
|
158
167
|
this.mentionMatch = null;
|
|
159
168
|
this.slashMatch = null;
|
|
160
169
|
this.emojiMatch = null;
|
|
@@ -164,6 +173,9 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
164
173
|
this.lastAutosaveValue = '';
|
|
165
174
|
this.defaultValue = '';
|
|
166
175
|
this.syncingValue = false;
|
|
176
|
+
/** Last raw HTML given to setContent; a re-parse reads it while the document is unedited. */
|
|
177
|
+
this.lastSourceHtml = '';
|
|
178
|
+
this.lastSerializedValue = '';
|
|
167
179
|
this.pendingChange = false;
|
|
168
180
|
/** Body overflow value before fullscreen locked it; null = not locked. */
|
|
169
181
|
this.previousBodyOverflow = null;
|
|
@@ -181,6 +193,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
181
193
|
menu.open = false;
|
|
182
194
|
});
|
|
183
195
|
};
|
|
196
|
+
this.renderProbe = null;
|
|
184
197
|
/**
|
|
185
198
|
* True while a drag-selection is in progress with the format painter armed.
|
|
186
199
|
* Suppresses the mid-drag auto-apply in {@link handleTransaction} so the
|
|
@@ -330,11 +343,16 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
330
343
|
}
|
|
331
344
|
}
|
|
332
345
|
updated(changed) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
346
|
+
// Normalize the allowlist first; a value change is external only if it differs from the serialized doc.
|
|
347
|
+
if (changed.has('allowedStyles')) {
|
|
348
|
+
this.normalizedAllowedStyles = normalizeEmailAllowedStyles(this.allowedStyles);
|
|
349
|
+
}
|
|
350
|
+
const externalValueChange = changed.has('value') &&
|
|
351
|
+
!!this.view &&
|
|
352
|
+
!this.syncingValue &&
|
|
353
|
+
this.serializeDoc(this.view.state.doc) !== this.value;
|
|
354
|
+
if (externalValueChange)
|
|
355
|
+
this.setContent(this.value);
|
|
338
356
|
this.syncingValue = false;
|
|
339
357
|
if ((changed.has('disabled') || changed.has('readonly')) && this.view) {
|
|
340
358
|
this.view.setProps({});
|
|
@@ -358,6 +376,19 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
358
376
|
if (changed.has('noTextTransform') && this.view && !changed.has('value')) {
|
|
359
377
|
this.view.updateState(this.buildState(this.view.state.doc));
|
|
360
378
|
}
|
|
379
|
+
// Toggling fidelity re-parses the current value: the flag changes how the
|
|
380
|
+
// same HTML maps to the document model (container styles, cell layout…).
|
|
381
|
+
if (changed.has('emailFidelity') && this.view && !externalValueChange) {
|
|
382
|
+
this.setContent(this.reparseSource());
|
|
383
|
+
}
|
|
384
|
+
// A new allowlist re-parses so the newly-allowed properties take effect on
|
|
385
|
+
// already-loaded content (recovering them from the raw source when unedited).
|
|
386
|
+
else if (changed.has('allowedStyles') && this.view && !externalValueChange) {
|
|
387
|
+
this.setContent(this.reparseSource());
|
|
388
|
+
}
|
|
389
|
+
if (changed.has('noTableMenu') || changed.has('emailFidelity')) {
|
|
390
|
+
this.updateOverlays();
|
|
391
|
+
}
|
|
361
392
|
// Lock page scrolling while fullscreen covers the viewport.
|
|
362
393
|
if (changed.has('fullscreen')) {
|
|
363
394
|
if (this.fullscreen) {
|
|
@@ -425,6 +456,8 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
425
456
|
getMaxLength: () => this.maxLength,
|
|
426
457
|
getForcePlainText: () => this.pasteAsPlainText,
|
|
427
458
|
getMarkdownPaste: () => !this.noMarkdownPaste,
|
|
459
|
+
getEmailFidelity: () => this.emailFidelity,
|
|
460
|
+
getAllowedStyles: () => this.normalizedAllowedStyles,
|
|
428
461
|
getSanitize: () => this.sanitize,
|
|
429
462
|
textTransform: !this.noTextTransform,
|
|
430
463
|
});
|
|
@@ -442,11 +475,49 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
442
475
|
formatPainter: isFormatPainterArmed(state),
|
|
443
476
|
};
|
|
444
477
|
}
|
|
478
|
+
/** HTML to re-parse when fidelity / the allowlist changes: the raw source when
|
|
479
|
+
* the document is still unedited (so a newly-allowed property can be recovered),
|
|
480
|
+
* otherwise the current serialized value (so user edits are kept). */
|
|
481
|
+
reparseSource() {
|
|
482
|
+
return this.value === this.lastSerializedValue ? this.lastSourceHtml : this.value;
|
|
483
|
+
}
|
|
484
|
+
/** The saved HTML; with email-fidelity it carries the editor's table rendering. */
|
|
485
|
+
serializeDoc(doc) {
|
|
486
|
+
return docToHtml(doc, this.emailFidelity ? this.emailRenderDefaults() : undefined);
|
|
487
|
+
}
|
|
488
|
+
/** Theme-resolved table border and header colours; null where the theme draws none. */
|
|
489
|
+
emailRenderDefaults() {
|
|
490
|
+
const root = this.shadowRoot;
|
|
491
|
+
if (!root || !this.isConnected)
|
|
492
|
+
return { borderColor: null, headerBackground: null };
|
|
493
|
+
if (!this.renderProbe || !this.renderProbe.isConnected) {
|
|
494
|
+
const probe = document.createElement('span');
|
|
495
|
+
probe.setAttribute('aria-hidden', 'true');
|
|
496
|
+
probe.style.cssText =
|
|
497
|
+
'position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;' +
|
|
498
|
+
'border-top:1px solid var(--nile-wysiwyg-table-border, var(--nile-colors-neutral-300, var(--ng-colors-border-primary)));' +
|
|
499
|
+
'background-color:var(--nile-wysiwyg-table-header-bg, var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary)));';
|
|
500
|
+
root.appendChild(probe);
|
|
501
|
+
this.renderProbe = probe;
|
|
502
|
+
}
|
|
503
|
+
const computed = getComputedStyle(this.renderProbe);
|
|
504
|
+
const background = computed.backgroundColor;
|
|
505
|
+
return {
|
|
506
|
+
borderColor: computed.borderTopStyle === 'solid' ? computed.borderTopColor : null,
|
|
507
|
+
headerBackground: background && background !== 'transparent' && background !== 'rgba(0, 0, 0, 0)'
|
|
508
|
+
? background
|
|
509
|
+
: null,
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
/** Email-fidelity options threaded to every sanitize/parse call. */
|
|
513
|
+
emailOptions() {
|
|
514
|
+
return { emailFidelity: this.emailFidelity, allowedStyles: this.normalizedAllowedStyles };
|
|
515
|
+
}
|
|
445
516
|
mountView() {
|
|
446
517
|
if (this.view || !this.surfaceEl)
|
|
447
518
|
return;
|
|
448
519
|
let doc = this.value
|
|
449
|
-
? htmlToDoc(defaultSchema, this.value, this.sanitize)
|
|
520
|
+
? htmlToDoc(defaultSchema, this.value, this.sanitize, this.emailOptions())
|
|
450
521
|
: undefined;
|
|
451
522
|
if (doc && this.singleLine)
|
|
452
523
|
doc = flattenToSingleParagraph(doc);
|
|
@@ -458,7 +529,12 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
458
529
|
// Word/Google Docs clipboard HTML gets normalized (real lists, no
|
|
459
530
|
// mso noise) before the sanitizer clamps it to the schema.
|
|
460
531
|
const cleaned = isOfficeHtml(pasted) ? cleanOfficeHtml(pasted) : pasted;
|
|
461
|
-
|
|
532
|
+
let out = this.sanitize ? sanitizeHtml(cleaned, this.emailOptions()) : cleaned;
|
|
533
|
+
// Lift container background/font off the markup so pasted email HTML
|
|
534
|
+
// doesn't bloat into per-run marks (fidelity only).
|
|
535
|
+
if (this.emailFidelity)
|
|
536
|
+
out = relocateEmailContainers(out);
|
|
537
|
+
return out;
|
|
462
538
|
},
|
|
463
539
|
handleDOMEvents: {
|
|
464
540
|
mousedown: () => {
|
|
@@ -551,7 +627,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
551
627
|
}
|
|
552
628
|
}
|
|
553
629
|
buildChangeDetail(doc) {
|
|
554
|
-
const value = isDocEmpty(doc) ? '' :
|
|
630
|
+
const value = isDocEmpty(doc) ? '' : this.serializeDoc(doc);
|
|
555
631
|
return { value, json: docToJson(doc), content: value };
|
|
556
632
|
}
|
|
557
633
|
scheduleChange() {
|
|
@@ -572,7 +648,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
572
648
|
syncFormValue(doc) {
|
|
573
649
|
if (!this.internals)
|
|
574
650
|
return;
|
|
575
|
-
const value = isDocEmpty(doc) ? '' :
|
|
651
|
+
const value = isDocEmpty(doc) ? '' : this.serializeDoc(doc);
|
|
576
652
|
this.internals.setFormValue(value === '' ? null : value);
|
|
577
653
|
this.updateValidity();
|
|
578
654
|
}
|
|
@@ -653,7 +729,12 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
653
729
|
this.bubbleMenuEl.updateComplete.then(() => this.positionOverlay(this.bubbleMenuEl, 'above'));
|
|
654
730
|
}
|
|
655
731
|
if (this.tableMenuEl) {
|
|
656
|
-
const showTable = this.
|
|
732
|
+
const showTable = !this.noTableMenu &&
|
|
733
|
+
this.hasFocus &&
|
|
734
|
+
!!this.toolbarState &&
|
|
735
|
+
this.toolbarState.inTable &&
|
|
736
|
+
!(this.emailFidelity && this.toolbarState.tableLayout) &&
|
|
737
|
+
!panelOpen;
|
|
657
738
|
this.tableMenuEl.open = showTable;
|
|
658
739
|
if (showTable) {
|
|
659
740
|
this.tableMenuEl.updateComplete.then(() => this.positionOverlay(this.tableMenuEl, 'below'));
|
|
@@ -1426,7 +1507,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
1426
1507
|
}
|
|
1427
1508
|
getHTML() {
|
|
1428
1509
|
return this.view && !isDocEmpty(this.view.state.doc)
|
|
1429
|
-
?
|
|
1510
|
+
? this.serializeDoc(this.view.state.doc)
|
|
1430
1511
|
: '';
|
|
1431
1512
|
}
|
|
1432
1513
|
getJSON() {
|
|
@@ -1464,15 +1545,18 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
1464
1545
|
this.value = content;
|
|
1465
1546
|
return;
|
|
1466
1547
|
}
|
|
1548
|
+
if (typeof content === 'string')
|
|
1549
|
+
this.lastSourceHtml = content;
|
|
1467
1550
|
let doc = typeof content === 'string'
|
|
1468
|
-
? htmlToDoc(defaultSchema, content, this.sanitize)
|
|
1551
|
+
? htmlToDoc(defaultSchema, content, this.sanitize, this.emailOptions())
|
|
1469
1552
|
: jsonToDoc(defaultSchema, content);
|
|
1470
1553
|
if (this.singleLine)
|
|
1471
1554
|
doc = flattenToSingleParagraph(doc);
|
|
1472
1555
|
this.view.updateState(this.buildState(doc));
|
|
1473
1556
|
this.toolbarState = this.snapshotToolbar(this.view.state);
|
|
1474
1557
|
this.syncingValue = true;
|
|
1475
|
-
this.value = isDocEmpty(doc) ? '' :
|
|
1558
|
+
this.value = isDocEmpty(doc) ? '' : this.serializeDoc(doc);
|
|
1559
|
+
this.lastSerializedValue = this.value;
|
|
1476
1560
|
this.syncFormValue(doc);
|
|
1477
1561
|
if (emitChange) {
|
|
1478
1562
|
this.emit('nile-input', this.buildChangeDetail(doc));
|
|
@@ -1486,7 +1570,7 @@ let NileWysiwygEditor = class NileWysiwygEditor extends NileElement {
|
|
|
1486
1570
|
insertHTML(htmlContent) {
|
|
1487
1571
|
if (!this.view)
|
|
1488
1572
|
return;
|
|
1489
|
-
const slice = htmlToSlice(defaultSchema, htmlContent, this.sanitize);
|
|
1573
|
+
const slice = htmlToSlice(defaultSchema, htmlContent, this.sanitize, this.emailOptions());
|
|
1490
1574
|
this.view.dispatch(this.view.state.tr.replaceSelection(slice).scrollIntoView());
|
|
1491
1575
|
this.view.focus();
|
|
1492
1576
|
}
|
|
@@ -2001,6 +2085,9 @@ __decorate([
|
|
|
2001
2085
|
__decorate([
|
|
2002
2086
|
property({ type: Boolean, attribute: 'no-emoji' })
|
|
2003
2087
|
], NileWysiwygEditor.prototype, "noEmoji", void 0);
|
|
2088
|
+
__decorate([
|
|
2089
|
+
property({ type: Boolean, attribute: 'no-table-menu' })
|
|
2090
|
+
], NileWysiwygEditor.prototype, "noTableMenu", void 0);
|
|
2004
2091
|
__decorate([
|
|
2005
2092
|
property({ type: Number, attribute: 'maxlength' })
|
|
2006
2093
|
], NileWysiwygEditor.prototype, "maxLength", void 0);
|
|
@@ -2082,6 +2169,17 @@ __decorate([
|
|
|
2082
2169
|
__decorate([
|
|
2083
2170
|
property({ type: Boolean, attribute: 'no-markdown-paste' })
|
|
2084
2171
|
], NileWysiwygEditor.prototype, "noMarkdownPaste", void 0);
|
|
2172
|
+
__decorate([
|
|
2173
|
+
property({ type: Boolean, attribute: 'email-fidelity', reflect: true })
|
|
2174
|
+
], NileWysiwygEditor.prototype, "emailFidelity", void 0);
|
|
2175
|
+
__decorate([
|
|
2176
|
+
property({
|
|
2177
|
+
attribute: 'allowed-styles',
|
|
2178
|
+
converter: {
|
|
2179
|
+
fromAttribute: (value) => parseAllowedStylesAttr(value ?? ''),
|
|
2180
|
+
},
|
|
2181
|
+
})
|
|
2182
|
+
], NileWysiwygEditor.prototype, "allowedStyles", void 0);
|
|
2085
2183
|
__decorate([
|
|
2086
2184
|
property({ type: Boolean, attribute: 'no-text-transform' })
|
|
2087
2185
|
], NileWysiwygEditor.prototype, "noTextTransform", void 0);
|