jodit 4.13.27 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +19 -19
- package/es2015/jodit.js +1096 -884
- package/es2015/jodit.min.js +20 -20
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +10 -10
- package/es2015/plugins/debug/debug.min.js +4 -4
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +2 -2
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.fat.min.js +19 -19
- package/es2018/jodit.min.js +19 -19
- package/es2018/plugins/debug/debug.min.js +4 -4
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +29 -29
- package/es2021/jodit.js +1090 -875
- package/es2021/jodit.min.js +29 -29
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +10 -10
- package/es2021/plugins/debug/debug.min.js +4 -4
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +2 -2
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +29 -29
- package/es2021.en/jodit.js +1090 -875
- package/es2021.en/jodit.min.js +29 -29
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +10 -10
- package/es2021.en/plugins/debug/debug.min.js +4 -4
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +2 -2
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1213 -925
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +10 -10
- package/es5/plugins/debug/debug.min.js +2 -2
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +2 -2
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/create/create.js +2 -2
- package/esm/core/dom/dom.d.ts +21 -13
- package/esm/core/dom/dom.js +58 -87
- package/esm/core/global.js +3 -2
- package/esm/core/helpers/html/apply-styles.js +14 -10
- package/esm/core/helpers/html/clean-from-word.js +8 -4
- package/esm/core/helpers/html/safe-html.js +23 -14
- package/esm/core/helpers/html/strip-tags.js +9 -4
- package/esm/core/helpers/utils/align.d.ts +0 -3
- package/esm/core/helpers/utils/align.js +15 -18
- package/esm/core/helpers/utils/append-script.js +13 -10
- package/esm/core/helpers/utils/attr.d.ts +3 -1
- package/esm/core/helpers/utils/attr.js +18 -0
- package/esm/core/helpers/utils/css.d.ts +18 -1
- package/esm/core/helpers/utils/css.js +15 -0
- package/esm/core/helpers/utils/print.js +17 -14
- package/esm/core/helpers/utils/reset.js +3 -0
- package/esm/core/helpers/utils/selector.js +11 -7
- package/esm/core/selection/helpers/move-node-inside-start.js +1 -1
- package/esm/core/selection/selection.js +29 -26
- package/esm/core/selection/style/api/is-same-attributes.js +5 -2
- package/esm/core/selection/style/api/toggle-attributes.js +8 -9
- package/esm/core/selection/style/api/wrap-unwrapped-text.js +2 -2
- package/esm/core/traits/elms.js +11 -3
- package/esm/core/ui/button/button/button.js +3 -3
- package/esm/core/ui/button/group/group.js +2 -1
- package/esm/core/ui/button/tooltip/tooltip.js +2 -2
- package/esm/core/ui/element.js +1 -1
- package/esm/core/ui/form/inputs/area/area.js +3 -2
- package/esm/core/ui/form/inputs/file/file.js +2 -1
- package/esm/core/ui/form/inputs/input/input.js +5 -5
- package/esm/core/ui/group/group.js +7 -7
- package/esm/core/ui/icon.js +2 -2
- package/esm/core/ui/popup/popup.js +10 -8
- package/esm/core/ui/progress-bar/progress-bar.js +3 -4
- package/esm/core/view/view-with-toolbar.js +1 -1
- package/esm/core/view/view.js +1 -1
- package/esm/jodit.js +30 -28
- package/esm/modules/dialog/alert.js +1 -1
- package/esm/modules/dialog/confirm.js +3 -2
- package/esm/modules/dialog/dialog.d.ts +6 -0
- package/esm/modules/dialog/dialog.js +40 -22
- package/esm/modules/dialog/prompt.js +4 -3
- package/esm/modules/file-browser/builders/context-menu.js +5 -5
- package/esm/modules/file-browser/config.js +3 -1
- package/esm/modules/file-browser/file-browser.js +7 -4
- package/esm/modules/file-browser/listeners/state-listeners.js +6 -6
- package/esm/modules/image-editor/image-editor.js +31 -17
- package/esm/modules/messages/messages.js +2 -1
- package/esm/modules/status-bar/status-bar.js +3 -4
- package/esm/modules/table/table.js +22 -18
- package/esm/modules/toolbar/button/button.js +4 -4
- package/esm/modules/toolbar/button/content.js +12 -4
- package/esm/modules/toolbar/collection/collection.js +4 -2
- package/esm/modules/uploader/config.js +3 -2
- package/esm/modules/uploader/helpers/process-old-browser-drag.js +1 -1
- package/esm/modules/uploader/uploader.js +7 -2
- package/esm/modules/widget/color-picker/color-picker.js +4 -4
- package/esm/modules/widget/file-selector/file-selector.js +6 -6
- package/esm/modules/widget/tabs/tabs.js +5 -5
- package/esm/plugins/add-new-line/add-new-line.js +8 -7
- package/esm/plugins/ai-assistant/ui/ui-ai-assistant.js +4 -4
- package/esm/plugins/backspace/cases/check-join-neighbors.js +4 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/allow-attributes.js +5 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +1 -1
- package/esm/plugins/color/config.js +4 -4
- package/esm/plugins/copy-format/copy-format.js +1 -1
- package/esm/plugins/delete/delete.js +9 -2
- package/esm/plugins/drag-and-drop/drag-and-drop.js +1 -1
- package/esm/plugins/drag-and-drop-element/drag-and-drop-element.js +1 -1
- package/esm/plugins/enter/helpers/insert-paragraph.js +1 -1
- package/esm/plugins/enter/helpers/process-empty-li-leaf.js +2 -2
- package/esm/plugins/enter/helpers/wrap-text.js +1 -1
- package/esm/plugins/fullsize/fullsize.js +3 -2
- package/esm/plugins/iframe/iframe.js +6 -5
- package/esm/plugins/image-properties/readers/align.js +6 -5
- package/esm/plugins/image-properties/readers/index.js +3 -1
- package/esm/plugins/image-properties/ui/ui-image-form.js +2 -1
- package/esm/plugins/image-properties/writers/index.js +2 -1
- package/esm/plugins/image-properties/writers/link.js +1 -1
- package/esm/plugins/indent/config.js +3 -2
- package/esm/plugins/indent/indent.js +4 -2
- package/esm/plugins/media/media.js +10 -7
- package/esm/plugins/mobile/config.js +2 -2
- package/esm/plugins/paste-storage/paste-storage.js +5 -5
- package/esm/plugins/placeholder/placeholder.js +13 -11
- package/esm/plugins/print/print.js +2 -2
- package/esm/plugins/resize-cells/resize-cells.js +13 -15
- package/esm/plugins/resize-handler/resize-handler.js +3 -4
- package/esm/plugins/resizer/resizer.js +11 -10
- package/esm/plugins/search/helpers/highlight-text-ranges.js +1 -1
- package/esm/plugins/search/ui/search.js +1 -1
- package/esm/plugins/select/select.js +2 -2
- package/esm/plugins/select-cells/select-cells.js +5 -6
- package/esm/plugins/source/editor/engines/ace.js +2 -1
- package/esm/plugins/source/editor/engines/area.js +3 -3
- package/esm/plugins/source/source.js +2 -2
- package/esm/plugins/speech-recognize/speech-recognize.js +1 -1
- package/esm/plugins/sticky/sticky.js +1 -1
- package/esm/plugins/symbols/config.js +3 -2
- package/esm/plugins/symbols/symbols.js +6 -5
- package/esm/plugins/tab/cases/on-tab-inside-li.js +2 -2
- package/esm/plugins/table/config.js +18 -10
- package/esm/plugins/table-keyboard-navigation/table-keyboard-navigation.js +2 -2
- package/esm/plugins/wrap-nodes/wrap-nodes.js +2 -2
- package/esm/plugins/xpath/xpath.js +2 -3
- package/esm/types/index.d.ts +1 -0
- package/esm/types/vdom.d.ts +96 -0
- package/package.json +1 -1
- package/types/core/dom/dom.d.ts +21 -13
- package/types/core/helpers/utils/align.d.ts +0 -3
- package/types/core/helpers/utils/attr.d.ts +3 -1
- package/types/core/helpers/utils/css.d.ts +18 -1
- package/types/modules/dialog/dialog.d.ts +6 -0
- package/types/types/index.d.ts +1 -0
- package/types/types/vdom.d.ts +96 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,33 @@
|
|
|
9
9
|
> - :house: [Internal]
|
|
10
10
|
> - :nail_care: [Polish]
|
|
11
11
|
|
|
12
|
+
## 4.14.0
|
|
13
|
+
|
|
14
|
+
#### :house: Internal
|
|
15
|
+
|
|
16
|
+
- **DOM access goes through the `Dom` module only.** Groundwork for virtual-DOM editing, no public API changes: parameter types are widened, return types untouched. New `src/types/vdom.d.ts` describes the structural subset of the browser DOM the editor relies on (`VNode`, `VElement`, `VHTMLElement`, `VStyle`, `VDocument`); browser nodes satisfy it, so existing call sites compile unchanged. The `Dom` mutation/structural core (`append`, `prepend`, `after`, `before`, `appendChildFirst`, `detach`, `unwrap`, `moveContent`, `sibling`, `hide`/`show`) is typed against that subset and deduplicated (`first`/`last` share one traversal, `prevWithClass`/`nextWithClass` share one helper). A new *Virtual DOM contract* suite in `dom.test.js` runs `Dom` against a non-browser VNode implementation, pinning the invariant at runtime. Across `core`, `modules`, `plugins` and `jodit.ts`: no direct `appendChild`/`insertBefore`/`removeChild`/`replaceChild` left outside `Dom` (was ~207 call sites), `.style.x =` → `css()`/`VStyle`, `get`/`setAttribute` → `attr()`, `querySelector` reduced to the sanctioned boundaries (user-supplied selectors in `selector.ts`, pasted stylesheet selectors in `apply-styles.ts`, the `BASE_PATH` bootstrap in `constants.ts`, the sanitizers). [#1441](https://github.com/xdan/jodit/pull/1441)
|
|
17
|
+
- **Dialog**: open dialogs are tracked in a static registry; `setMaxZIndex`/`getMaxZIndexDialog` read it instead of scanning the whole `destination` subtree (usually `document.body`) on every open and mousedown.
|
|
18
|
+
|
|
19
|
+
#### :rocket: New Feature
|
|
20
|
+
|
|
21
|
+
- **`cssInline(element, key)`**: exact inline read of a CSS property (the `style` attribute) — no computed style, no layout access, no number/color normalization. `css(element, key, true)` still works but is deprecated: its result goes through `normalizeCssValue` (`'0px'` → `0`, `bold` → `700`), which made it unusable for exact comparisons and save/restore. Internal call sites (popup/dialog z-index, indent, resizer, media, image properties readers, table widths) migrated.
|
|
22
|
+
- **`attrRaw(element, name, value?)`**: attribute access with the name taken verbatim — no camelCase → kebab-case conversion, no `data-` fallback, no `px` stripping. Used by the sanitizers (`safeHTML`, `cleanHTML.allowTags`, `cleanFromWord`) and attribute comparison, where `attr()`'s name normalization must never apply (`onLoad`, `viewBox`, `xlink:href`).
|
|
23
|
+
- **`VTokenList.length`** added to the VNode subset.
|
|
24
|
+
|
|
25
|
+
#### :bug: Bug Fix
|
|
26
|
+
|
|
27
|
+
- **Paste from Word**: attribute cleanup on inline SVG (`viewBox`, `preserveAspectRatio`, …) silently skipped those attributes because the removal went through `attr()`, which kebab-cased the names. Uses `attrRaw` now.
|
|
28
|
+
- **Uploader**: `bind(form)` matches `<input type="FILE">` again (attribute selectors are case-insensitive, the `attr()` comparison was not).
|
|
29
|
+
- **Dialog / Resize cells**: dialog position and the cell resize handle keep fractional pixels; the numeric `css()` setter truncated them to integers.
|
|
30
|
+
- **Resizer**: an image with an inline `width: 0px` is treated as having an inline size again (`cssInline` keeps the raw `'0px'` where `css(..., true)` returned `0`).
|
|
31
|
+
|
|
32
|
+
#### :nail_care: Polish
|
|
33
|
+
|
|
34
|
+
- `Dom.temporaryList` is no longer deprecated: it is the history snapshot cleanup and is a plain tree walk (no selector engine, works on `VNode`).
|
|
35
|
+
- `alignElement` looks the command up in a `Map` instead of a plain object (no prototype keys).
|
|
36
|
+
- Toolbar/plugin tag sets (`Dom.isTag(node, Set)`) hoisted to module constants instead of being allocated per visited node.
|
|
37
|
+
- `element.innerHTML = ''` clears replaced with `Dom.detach(element)` (table rows, tooltip, paste storage, delete, debug, inline container).
|
|
38
|
+
|
|
12
39
|
## 4.13.27
|
|
13
40
|
|
|
14
41
|
#### :rocket: New Feature
|
package/es2015/jodit.css
CHANGED