magic-editor-x 2.3.0 → 2.4.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 +87 -0
- package/README.md +299 -142
- package/dist/admin/AuditPage-C2u6z4aN.js +381 -0
- package/dist/admin/AuditPage-guB0SiGS.mjs +381 -0
- package/dist/admin/{ConfigurationPage-C-UktL1x.js → ConfigurationPage-D6uya-J1.js} +228 -13
- package/dist/admin/{ConfigurationPage-BxLHIQdo.mjs → ConfigurationPage-DiEpF1Rr.mjs} +222 -7
- package/dist/admin/ConfirmAction-CUhpngYU.js +71 -0
- package/dist/admin/ConfirmAction-CZjpduc3.mjs +72 -0
- package/dist/admin/{CustomBlocksPage-D8aMbVXc.mjs → CustomBlocksPage-Byt10-6c.mjs} +6 -4
- package/dist/admin/{CustomBlocksPage-CxcTfdOT.js → CustomBlocksPage-DP3h_wNd.js} +21 -19
- package/dist/admin/MentionsWidget-C2OCAmqq.js +227 -0
- package/dist/admin/MentionsWidget-sMkM9mHX.mjs +225 -0
- package/dist/admin/{TemplatesPage-Hn6gyu2l.js → TemplatesPage-DrSJdteI.js} +313 -17
- package/dist/admin/{TemplatesPage-jhYi6Zdf.mjs → TemplatesPage-Yp4OqFE2.mjs} +305 -9
- package/dist/admin/{ConfirmAction-DuQwvRYi.mjs → api-2ZRpHM3d.mjs} +19 -70
- package/dist/admin/{ConfirmAction-zLuIFj8t.js → api-bix9RLLI.js} +19 -70
- package/dist/admin/auditText-DIIYVR6k.mjs +110 -0
- package/dist/admin/auditText-DUhWu2Nx.js +109 -0
- package/dist/admin/comments-C7P41lan.js +86 -0
- package/dist/admin/comments-hfIbLQNO.mjs +87 -0
- package/dist/admin/{de-BMY2LBaa.mjs → de-BNPIGqhs.mjs} +41 -2
- package/dist/admin/{de-2Ie5jy7j.js → de-BhhGss1l.js} +41 -2
- package/dist/admin/{de-DOiGaTNX.mjs → de-CKz6CG3V.mjs} +191 -5
- package/dist/admin/{de-C3AsGauQ.js → de-CbBDnXeT.js} +140 -1
- package/dist/admin/{de-BUS1hUw0.mjs → de-DiCZrmH8.mjs} +140 -1
- package/dist/admin/{de-B1X46JJZ.js → de-zcV8D7nt.js} +191 -5
- package/dist/admin/{en-Ah-Cw0Wd.js → en-B9ApE1y1.js} +41 -2
- package/dist/admin/{en-CDg_18Bt.js → en-BMWhILnj.js} +191 -5
- package/dist/admin/{en-BkEjpC3i.js → en-CpehF0Kv.js} +140 -1
- package/dist/admin/{en-GCzgS9Aw.mjs → en-DCPMqFIa.mjs} +140 -1
- package/dist/admin/{en-CU6UzV4g.mjs → en-cYzqbASF.mjs} +191 -5
- package/dist/admin/{en-CvFiqti2.mjs → en-gFLeK9Ng.mjs} +41 -2
- package/dist/admin/{es-DbKHZz5l.mjs → es-BmwBgEgz.mjs} +41 -2
- package/dist/admin/{es-Cr8JH85N.js → es-C0W31rl8.js} +41 -2
- package/dist/admin/{es-BCpJmUEM.js → es-CQPh8PXw.js} +191 -5
- package/dist/admin/{es-C4pEnDRv.js → es-CawpzwyC.js} +140 -1
- package/dist/admin/{es-DHBBZKl2.mjs → es-Chs37IBR.mjs} +140 -1
- package/dist/admin/{es-BmfffNM2.mjs → es-DCamt1ek.mjs} +191 -5
- package/dist/admin/{fr-DQJ_7aq5.mjs → fr-CMWBNE5D.mjs} +41 -2
- package/dist/admin/{fr-C2aLSwEu.js → fr-COOsqexl.js} +140 -1
- package/dist/admin/{fr-Dvq4xk2e.mjs → fr-Dp5-XP29.mjs} +140 -1
- package/dist/admin/{fr-ZcN0yM_2.js → fr-DpC44Ol8.js} +191 -5
- package/dist/admin/{fr-OJ4VW1kh.js → fr-iGeIfEcU.js} +41 -2
- package/dist/admin/{fr-DZd2XJP6.mjs → fr-oW0t8bT5.mjs} +191 -5
- package/dist/admin/{index-Cm-fFUhE.js → index-64wc26Bl.js} +13851 -6746
- package/dist/admin/{index-XgfwqLfV.mjs → index-BVjf1gVC.mjs} +13788 -6682
- package/dist/admin/{index-BHBRr562.js → index-D6Z7i8ba.js} +1003 -53
- package/dist/admin/{index-CQk1XeNb.mjs → index-D_Fv8Non.mjs} +1032 -82
- package/dist/admin/index.js +2 -1
- package/dist/admin/index.mjs +3 -2
- package/dist/admin/math-CIQ4Z_mY.mjs +47 -0
- package/dist/admin/math-vsK_06ZR.js +49 -0
- package/dist/admin/{pt-D0I0_JYs.js → pt-BHmXk2d9.js} +41 -2
- package/dist/admin/{pt-CImqDnLB.js → pt-Bo0Pm_Pt.js} +191 -5
- package/dist/admin/{pt-CilDggGF.mjs → pt-DALDvfBn.mjs} +140 -1
- package/dist/admin/{pt-BSLzA17U.mjs → pt-DFNgZ5_k.mjs} +41 -2
- package/dist/admin/{pt-DX0OAIoL.js → pt-DXy7G1x7.js} +140 -1
- package/dist/admin/{pt-C3UdeIpd.mjs → pt-uGpfRQLC.mjs} +191 -5
- package/dist/admin/{useT-D3sM9Zf7.js → useT-BXJLIPN4.js} +1 -1
- package/dist/admin/{useT-CmaeZbCr.mjs → useT-CLPhBmBC.mjs} +1 -1
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks/index.js +13 -2
- package/dist/blocks/index.mjs +13 -2
- package/dist/math/index.d.mts +27 -0
- package/dist/math/index.d.ts +27 -0
- package/dist/math/index.js +164 -0
- package/dist/math/index.mjs +134 -0
- package/dist/react/index.js +673 -91
- package/dist/react/index.mjs +673 -91
- package/dist/render/index.d.mts +26 -0
- package/dist/render/index.d.ts +26 -0
- package/dist/render/index.js +779 -106
- package/dist/render/index.mjs +779 -106
- package/dist/server/index.js +10419 -4103
- package/dist/server/index.mjs +10419 -4103
- package/dist/vue/index.js +673 -91
- package/dist/vue/index.mjs +673 -91
- package/package.json +8 -2
- package/schema/magic-editor-x.schema.json +127 -2
- package/types/blocks.d.ts +2 -0
- package/types/index.d.ts +42 -0
- package/types/math.d.ts +27 -0
- package/types/render.d.ts +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [2.4.0](https://github.com/Schero94/Magic-Editor-X/compare/v2.3.1...v2.4.0) (2026-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* stable component field ids, tables v2, math, footnotes, range comments, suggest mode, audit trail and a simpler toolbar ([#8](https://github.com/Schero94/Magic-Editor-X/issues/8)) ([080d5af](https://github.com/Schero94/Magic-Editor-X/commit/080d5af4a4ca775560c42656956eb863a9bcfbcc))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Magic Editor X 2.4 adds better tables, math and footnotes, comments on selected text with @mentions, block suggestions, an audit trail and block-scoped AI, gives fields in repeatable components and dynamic zones their history, comments and live editing back, and fixes a collaboration bug that could delete blocks. The field toolbar is now short: undo, redo, **More tools** and full screen. There are no breaking changes; stored content keeps working and Editor.js stays at 2.31.7.
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- **Fields in repeatable components and dynamic zones** have version history, comments and live editing again. Their values carry a stable `fieldKey`, so history and comments follow their entry when entries are moved, added or removed. A new section gets them after its first save; until then the toolbar shows a hint. New optional `fieldKey` on `GET|POST /history`, `GET|POST /comments`, `POST /collaboration/session`, `GET /quality/link-report` and the new mention and suggestion routes; `meta.fieldKey`, `meta.positionalVersions`, `meta.positionalThreads`.
|
|
16
|
+
- **Tables** have a header row and a header column, per-column alignment, merged cells and a caption. Select cells with Shift+click and merge them, or use merge right/down from one cell. Tab moves between cells and Alt+F10 opens the table toolbar. Pasting from a spreadsheet fills the cells; pasting from Word or a web page keeps merged cells, header cells and alignment. New optional data keys `headerColumn`, `align`, `merges`, `caption`; renderers output `<caption>`, `<th scope>`, `colspan`/`rowspan` and `mex-align-*` classes, Markdown a GFM alignment row. Quality rule `table-empty-header`.
|
|
17
|
+
- **Math:** formulas in TeX as a block (`math`) or inside text (Ctrl/Cmd+Shift+E), with a live preview. The API and the renderers output MathML (Temml 0.14, MathML allow-list); new render option `math` and export `magic-editor-x/math` (`renderMath`, `checkMath`, `MATH_SETTINGS`). Markdown `$…$` / `$$…$$`. Quality rule `math-invalid`.
|
|
18
|
+
- **Footnotes** with Ctrl/Cmd+Alt+F, numbered in reading order and listed under the field. The note lives in its marker, so copy, move, undo and delete keep them together. Render option `footnotes`, GFM footnotes in Markdown. Quality rule `footnote-empty`.
|
|
19
|
+
- **Comments on selected text:** select text and choose Comment (Ctrl/Cmd+Alt+M); Magic Editor X highlights the passage and keeps the thread on the text while people edit. Ctrl/Cmd+Alt+N moves to the next comment. Read-only reviewers get a floating Comment button.
|
|
20
|
+
- **@mentions and notifications:** type `@` in a comment to mention a colleague who can read the field. They see it in the comments panel and in the **Mentions and replies** widget on the admin home page; replies notify the other people in the thread. Optional e-mails through the Strapi email plugin (`comments.notifications.email`, default `false`; `emailPerHour` 10), never with the comment text. Routes `GET /comments/mentionable`, `GET /notifications`, `POST /notifications/read-all`, `POST /notifications/:id/read|unread`; config `comments.mentionsPerMinute` (60).
|
|
21
|
+
- **Block suggestions:** give a role **Suggest block changes** (`suggestions.create`) and its members can choose Suggest changes even in fields they cannot edit. Their edits stay in a separate copy until they send them; each changed, new or removed block becomes one suggestion that editors with **Review block suggestions** (`suggestions.review`) accept or reject in the Suggestions panel. Accepted changes go into the field like any edit; save the entry to keep them. Routes `GET|POST /suggestions`, `POST /suggestions/:id/accept|reject`, `DELETE /suggestions/:id`; config `suggestions.enabled` (true), `suggestions.perMinute` (20).
|
|
22
|
+
- **AI for chosen blocks:** select blocks, or open a block's menu, and choose AI to rewrite, shorten, translate or change the tone of just those blocks (Ctrl/Cmd+Shift+G). Only their text is sent; a word diff shows the change before it is applied and one Undo reverts it. Route `POST /ai/blocks/:action`. The assistant for selected text now also keeps formatting the selection crosses, limits its answer to the field's inline tools and shows a word diff.
|
|
23
|
+
- **Audit trail:** Settings > Magic Editor X > Audit trail and an Activity tab in the version history show who changed which field, version, comment, suggestion, template, synced block or setting, and when, with counts and block ids but never content. Permission `audit.read`; routes `GET /audit`, `GET /audit/actors`; config `audit.enabled` (true), `audit.retentionDays` (180). Events are also sent to Strapi's Enterprise audit logs when that feature exists.
|
|
24
|
+
- **Versions of synced blocks:** every save of a synced source keeps a version; preview, compare, rename and restore them in Settings > Templates. Routes `GET /templates/:id/versions[/:versionId]`, `PUT /templates/:id/versions/:versionId`, `POST /templates/:id/versions/:versionId/restore`.
|
|
25
|
+
- **Scheduled link check:** **Run now** in Settings > Configuration and a time zone for the rule (`qualityChecks.externalLinks.schedule.tz`); `GET /quality/link-schedule` adds `tz` and `nextRunAt`.
|
|
26
|
+
- **`@` in text** opens entry suggestions at the caret and inserts a mention; e-mail addresses never trigger it.
|
|
27
|
+
- **Code file names:** the highlighted code block has an optional file name (`codeFlask.filename`), rendered as a caption and as ` ```lang title="…" ` in Markdown.
|
|
28
|
+
- **Pasted video and audio** from web pages become video and audio blocks: the file, poster and caption tracks are copied into the Media Library through the new SSRF-safe `POST /media/byUrl`. Config `uploads.maxMediaBytes` (50 MiB) and `uploads.allowPrivateOrigins` (`[]`, also used by images by URL).
|
|
29
|
+
- **Alt text from private image storage:** `ai.altText.allowPrivateOrigins` (`[]`) lists exact origins of upload storage inside your network that alt text suggestions may read.
|
|
30
|
+
- **Strapi AI translations** no longer corrupt Magic Editor X fields: only text is sent to the provider, and other locales are rebuilt from the source structure. A value that cannot be matched is refused with `AI_TRANSLATION_UNSAFE`.
|
|
31
|
+
- **Releases** show entries blocked by the publishing guard as "Not ready to publish".
|
|
32
|
+
- **Field toolbar:** undo, redo, a **More tools** menu (Review, Write, View) and full screen. Every other tool moved into the menu and appears only where it can work; keyboard shortcuts are unchanged.
|
|
33
|
+
|
|
34
|
+
### Fixes
|
|
35
|
+
|
|
36
|
+
- Collaboration: an editor that joined a room diffed its first edits against room content it had not rendered yet, which deleted the blocks it had not shown, including other people's acknowledged edits inside them; edits typed before the first sync were dropped. The base of every edit is now what the editor shows until it has rendered the room, and early edits are merged onto the room (present since 2.0).
|
|
37
|
+
- Live sessions without changes created a version when they ended, because Editor.js writes default settings (alignment left, no indent) into every block. Default settings now count as no setting in version comparisons.
|
|
38
|
+
- Collaboration: a data key removed by a collaborator stayed on other screens (Editor.js `blocks.update` merges data); after a remote change the caret returned only to the first input of a block.
|
|
39
|
+
- `@editorjs/table` dropped line breaks in cells.
|
|
40
|
+
- Copying blocks between editor fields went through HTML conversion and lost data; the Editor.js block clipboard is now used when the blocks fit the target field.
|
|
41
|
+
- Ctrl/Cmd+Enter in the footnote dialog and in comment boxes triggered the Content Manager save (403 for reviewers without update rights).
|
|
42
|
+
- The embed renderer computed the caption before deciding to render nothing.
|
|
43
|
+
- The block selection bar was not reachable with the keyboard.
|
|
44
|
+
- AI for selected text nested bold tags when the selection crossed formatting.
|
|
45
|
+
- The translate validator accepted the id `"01"` for `"1"`.
|
|
46
|
+
- Block menus opened under the next editor field.
|
|
47
|
+
- Collaboration: text typed in the first moments after a field with existing room content opened could lose its last characters (same cause as the first fix above).
|
|
48
|
+
- Code blocks: tokens without their own colour took the colours of the global code theme loaded by Strapi's Blocks field, some below the contrast minimum (for example Python builtins at 2.93:1); every token now has its own colour (present since 2.3).
|
|
49
|
+
- After "Leave focus mode" keyboard focus fell to the page; it now returns to More tools.
|
|
50
|
+
- Dialogs with icon buttons needed several Escape presses while a tooltip was open.
|
|
51
|
+
|
|
52
|
+
### Security
|
|
53
|
+
|
|
54
|
+
- See [docs/security-audit-2.4.md](./docs/security-audit-2.4.md): field identities (MEX-24-01), rows saved by position (MEX-24-02), tables (MEX-24-03), math (MEX-24-04), footnotes (MEX-24-05), video and audio by URL (MEX-24-06), the `@` trigger and code file names (MEX-24-07), AI for chosen blocks (MEX-24-08), alt text from private storage (MEX-24-09), audit trail (MEX-24-10), synced source versions (MEX-24-11), link check Run now and time zone (MEX-24-12), comment anchors (MEX-24-13), mentions, notifications and e-mail (MEX-24-14), suggestions (MEX-24-15), Strapi AI translations (MEX-24-16), Releases readiness and the published-status bypass (MEX-24-17) and the collaboration data-loss fix (MEX-24-18).
|
|
55
|
+
- `documents().create/update({ status: 'published' })`, which the Content API uses for `?status=published`, published without running the publishing guard. These writes are now refused with 400 `QUALITY_GATE` when a guarded field has errors.
|
|
56
|
+
- Dependencies: `temml` 0.14.0 added (MIT), `@editorjs/table` removed; `npm audit --omit=dev` reports 0 vulnerabilities.
|
|
57
|
+
|
|
58
|
+
### Notes
|
|
59
|
+
|
|
60
|
+
- **`fieldKey`:** values of editor fields inside repeatable components and dynamic zones get a top-level `fieldKey` (16 to 32 URL-safe characters) when they are saved. It is additive: renderers ignore it, the JSON Schema and `MagicEditorXData.fieldKey?` describe it, and Content API and GraphQL output include it. Top-level fields and fields in single components never get one.
|
|
61
|
+
- **Versions and comments saved by position before 2.4** are mapped to their entry when their block ids prove it, the first time that field's history or comments are opened. Rows that cannot be mapped stay readable but read-only ("Older versions saved by position", 409 `POSITIONAL_READ_ONLY`). Nothing is deleted.
|
|
62
|
+
- **`@editorjs/table` is replaced** by the plugin's own table tool. The stored `table` data is compatible: tables saved before 2.4 keep their exact shape and renderer output, and renderers that do not know the new keys show a full grid.
|
|
63
|
+
- **Content API `?status=published`** creates and updates now run the publishing guard. This is a behaviour change that matches what `publishGuard` always promised.
|
|
64
|
+
- **`math`:** the name is a built-in block now. Settings custom blocks named `math` from before 2.4 keep their data and tool; new ones cannot take the name. Blocks registered in code with the SDK may still be named `math`, so hosts that registered one with 2.3 keep starting.
|
|
65
|
+
- **Editor.js stays at 2.31.7:** 2.32.0 is still a release candidate on npm (`next` tag `2.32.0-rc.3`, checked 2026-11-12). [docs/engine-decision.md](./docs/engine-decision.md) explains why the plugin stays on Editor.js for 2.x.
|
|
66
|
+
- **Review workflows** are not supported: Strapi registers them only with an Enterprise or Growth plan, so a stage hook cannot be tested end to end and none ships.
|
|
67
|
+
- Known issues: an Editor.js toolbar handler swallows the first Tab presses in dialogs opened from an editor (also the keyboard shortcuts dialog); an empty field's first live catch-up can move focus into that field; discarding a draft whose published version predates 2.4 drops keys added to the draft.
|
|
68
|
+
|
|
69
|
+
### Migration
|
|
70
|
+
|
|
71
|
+
- No action needed. Rebuild the admin (`npm run build`) after updating.
|
|
72
|
+
- Grant the new permissions to roles that should use them: `suggestions.create`, `suggestions.review`, `audit.read`. No role gets them automatically.
|
|
73
|
+
- API clients that write values inside repeatable components or dynamic zones should send the stored `fieldKey` back (or the component `id`); otherwise each write gives the value a new key and its history and comments start fresh.
|
|
74
|
+
- Clients that create or update entries with `?status=published` on types with `publishGuard` must handle 400 `QUALITY_GATE`.
|
|
75
|
+
- Optional: `comments.notifications.email: true` (needs a working email provider), `qualityChecks.externalLinks.schedule.tz`, `uploads.allowPrivateOrigins`, `ai.altText.allowPrivateOrigins`. The audit trail is on by default; set `audit.enabled: false` to turn it off.
|
|
76
|
+
|
|
77
|
+
## [2.3.1](https://github.com/Schero94/Magic-Editor-X/compare/v2.3.0...v2.3.1) (2026-11-12)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
* no live room, history or comments for editor fields with positional paths ([#7](https://github.com/Schero94/Magic-Editor-X/issues/7)) ([4663f82](https://github.com/Schero94/Magic-Editor-X/commit/4663f82a82088a931cd3ca9b51c418075e1fc2a2))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- Version history and block comments are no longer offered for editor fields inside a repeatable component or a dynamic zone. Versions and comments are keyed by the positional path, so after an entry was removed or moved a version of another entry was listed, and restoring it would have put that entry's content into the editor. In 2.2 these fields had no version history (the routes answered 404). Keying versions and comments by component entry is planned for a later release.
|
|
88
|
+
- Editor fields inside a repeatable component or a dynamic zone no longer use live collaboration. Their path is positional (`sections.0.body`): after an entry whose editor had been opened was removed or moved before saving, the next entry joined the old room and showed the removed entry's content, and typing there would have saved it into the wrong entry. These fields are now edited without a live room; top-level fields and fields in single components keep live collaboration.
|
|
89
|
+
|
|
3
90
|
# [2.3.0](https://github.com/Schero94/Magic-Editor-X/compare/v2.2.0...v2.3.0) (2026-11-12)
|
|
4
91
|
|
|
5
92
|
|