magic-editor-x 2.2.0 → 2.3.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 +72 -0
- package/README.md +493 -168
- package/dist/admin/{ConfigurationPage-3Dir3dAf.mjs → ConfigurationPage-BxLHIQdo.mjs} +450 -21
- package/dist/admin/{ConfigurationPage-YvnPnna6.js → ConfigurationPage-C-UktL1x.js} +479 -50
- package/dist/admin/ConfirmAction-DuQwvRYi.mjs +125 -0
- package/dist/admin/ConfirmAction-zLuIFj8t.js +124 -0
- package/dist/admin/{CustomBlocksPage-BiiL2ORG.js → CustomBlocksPage-CxcTfdOT.js} +135 -84
- package/dist/admin/{CustomBlocksPage-CR2BaP9O.mjs → CustomBlocksPage-D8aMbVXc.mjs} +92 -41
- package/dist/admin/DraftSync-BIA8cZgA.js +11 -0
- package/dist/admin/DraftSync-CUxOMG-E.mjs +12 -0
- package/dist/admin/TemplatesPage-Hn6gyu2l.js +993 -0
- package/dist/admin/TemplatesPage-jhYi6Zdf.mjs +993 -0
- package/dist/admin/{de-BmmLBJli.mjs → de-1cFMs-4c.mjs} +2 -0
- package/dist/admin/{de-BteRx2iA.js → de-2Ie5jy7j.js} +79 -1
- package/dist/admin/{de-62Vxb2iw.js → de-B1X46JJZ.js} +205 -2
- package/dist/admin/{de-CFX5atOk.mjs → de-BMY2LBaa.mjs} +79 -1
- package/dist/admin/{de-Bt6pYIWi.mjs → de-BUS1hUw0.mjs} +145 -0
- package/dist/admin/{de-CVbi685U.js → de-C3AsGauQ.js} +145 -0
- package/dist/admin/{de-BVvwSYYO.mjs → de-DOiGaTNX.mjs} +205 -2
- package/dist/admin/{de-DaJwN6nk.js → de-Dn8athM8.js} +2 -0
- package/dist/admin/{en-CyjAcccB.js → en-Ah-Cw0Wd.js} +79 -1
- package/dist/admin/{en-BX362fTp.js → en-BkEjpC3i.js} +145 -0
- package/dist/admin/{en-VlkaIzrM.js → en-CDg_18Bt.js} +205 -2
- package/dist/admin/{en-Cn78RZs-.js → en-CIZ5Ggod.js} +2 -0
- package/dist/admin/{en-Cg2Ak5Cr.mjs → en-CU6UzV4g.mjs} +205 -2
- package/dist/admin/{en-ea0tfA5i.mjs → en-CvFiqti2.mjs} +79 -1
- package/dist/admin/{en-D7mZWLGp.mjs → en-Dc9y-6n9.mjs} +2 -0
- package/dist/admin/{en-B_HltUxZ.mjs → en-GCzgS9Aw.mjs} +145 -0
- package/dist/admin/{es-BT9oAcHf.js → es-BCpJmUEM.js} +205 -2
- package/dist/admin/{es-C9-cXdb6.mjs → es-BmfffNM2.mjs} +205 -2
- package/dist/admin/{es-BmGtLkJD.js → es-C4IRHV5d.js} +2 -0
- package/dist/admin/{es-CHHEZi44.js → es-C4pEnDRv.js} +145 -0
- package/dist/admin/{es-C8GZFGjv.js → es-Cr8JH85N.js} +79 -1
- package/dist/admin/{es-joykG5I9.mjs → es-D2Kw6E4N.mjs} +2 -0
- package/dist/admin/{es-CrhwOq-5.mjs → es-DHBBZKl2.mjs} +145 -0
- package/dist/admin/{es-CEi_ycX8.mjs → es-DbKHZz5l.mjs} +79 -1
- package/dist/admin/{fr-CrzxGe5e.mjs → fr-BOvvfEH7.mjs} +2 -0
- package/dist/admin/{fr-B3SL0TBV.js → fr-C2aLSwEu.js} +145 -0
- package/dist/admin/{fr-BAMSvQbR.mjs → fr-DQJ_7aq5.mjs} +79 -1
- package/dist/admin/{fr-DpU_qiXR.mjs → fr-DZd2XJP6.mjs} +205 -2
- package/dist/admin/{fr-5djKfQ3s.mjs → fr-Dvq4xk2e.mjs} +145 -0
- package/dist/admin/{fr-oRCJNdeJ.js → fr-OJ4VW1kh.js} +79 -1
- package/dist/admin/{fr-D6KJqPWi.js → fr-ZcN0yM_2.js} +205 -2
- package/dist/admin/{fr-Ct_uPqxV.js → fr-Zkb8vfjN.js} +2 -0
- package/dist/admin/index-BHBRr562.js +1940 -0
- package/dist/admin/index-CQk1XeNb.mjs +1939 -0
- package/dist/admin/{EditorField-Diq1j8kc.js → index-Cm-fFUhE.js} +13704 -6766
- package/dist/admin/{EditorField-B8pyAxPE.mjs → index-XgfwqLfV.mjs} +10203 -3265
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/{pt-chN2jrXl.js → pt-1IUyx6ae.js} +2 -0
- package/dist/admin/{pt-CQrfqsCN.mjs → pt-BSLzA17U.mjs} +79 -1
- package/dist/admin/{pt-jUqOR7Xh.mjs → pt-C3UdeIpd.mjs} +205 -2
- package/dist/admin/{pt-BOrl6x-r.js → pt-CImqDnLB.js} +205 -2
- package/dist/admin/{pt-BdnY2Cth.mjs → pt-CilDggGF.mjs} +145 -0
- package/dist/admin/{pt-tUeJ2Ywd.js → pt-D0I0_JYs.js} +79 -1
- package/dist/admin/{pt-EVwCuBUK.js → pt-DX0OAIoL.js} +145 -0
- package/dist/admin/{pt-Ga-4Hsv0.mjs → pt-etwsg3G4.mjs} +2 -0
- package/dist/admin/useBreakpoint-D30eNTkF.js +37 -0
- package/dist/admin/useBreakpoint-DCfn6pDG.mjs +38 -0
- package/dist/admin/useT-CmaeZbCr.mjs +65 -0
- package/dist/admin/{useT-BWZ_-Hel.js → useT-D3sM9Zf7.js} +4 -70
- package/dist/blocks/index.d.mts +167 -0
- package/dist/blocks/index.d.ts +167 -0
- package/dist/blocks/index.js +631 -0
- package/dist/blocks/index.mjs +609 -0
- package/dist/react/index.d.mts +39 -0
- package/dist/react/index.d.ts +39 -0
- package/dist/react/index.js +2687 -0
- package/dist/react/index.mjs +2657 -0
- package/dist/render/index.d.mts +131 -5
- package/dist/render/index.d.ts +131 -5
- package/dist/render/index.js +1679 -181
- package/dist/render/index.mjs +1679 -181
- package/dist/server/index.js +10645 -3716
- package/dist/server/index.mjs +10645 -3716
- package/dist/vue/index.d.mts +41 -0
- package/dist/vue/index.d.ts +41 -0
- package/dist/vue/index.js +2630 -0
- package/dist/vue/index.mjs +2610 -0
- package/package.json +30 -6
- package/schema/magic-editor-x.schema.json +540 -1
- package/types/blocks.d.ts +167 -0
- package/types/index.d.ts +127 -0
- package/types/react.d.ts +39 -0
- package/types/render.d.ts +131 -5
- package/types/vue.d.ts +41 -0
- package/dist/admin/api-Dsq53giv.js +0 -37
- package/dist/admin/api-RZ0Fz0BD.mjs +0 -38
- package/dist/admin/index-C-lyON1B.mjs +0 -303
- package/dist/admin/index-iA0lued_.js +0 -302
- package/dist/admin/sanitize-Cb4jvBhj.js +0 -628
- package/dist/admin/sanitize-ClkX823p.mjs +0 -627
- package/dist/admin/useT-pvHmgBFj.mjs +0 -131
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [2.3.0](https://github.com/Schero94/Magic-Editor-X/compare/v2.2.0...v2.3.0) (2026-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* framework renderers, API output, block SDK, media, templates, synced blocks and comments (2.3.0) ([#6](https://github.com/Schero94/Magic-Editor-X/issues/6)) ([2256161](https://github.com/Schero94/Magic-Editor-X/commit/2256161ef99b1eee504d7a012df00808d60f4fb7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Magic Editor X 2.3 connects the editor to the rest of your stack: React and Vue components, rendered and resolved Content API and GraphQL output, a block SDK, media blocks, templates, patterns and synced blocks, block comments, mentions and a table of contents, plus optional AI and grammar assistants. No migration is needed; stored content keeps the same Editor.js JSON and every new output is opt-in.
|
|
12
|
+
|
|
13
|
+
### Highlights
|
|
14
|
+
|
|
15
|
+
- **React, Vue, Nuxt and Astro.** `magic-editor-x/react` and `magic-editor-x/vue` render content with real components (per-block components or slots) from the same render tree as `renderHtml`; guides for Astro, React and Vue/Nuxt are in `docs/guides/`.
|
|
16
|
+
- **Rendered and resolved API output.** `?mex=html|text|markdown|json` on Content API GET requests, and `<field>Rendered(format)` / `<field>Resolved` in GraphQL. Internal links, mentions, embedded entries, Media Library files and synced blocks are resolved with the caller's permissions; draft-only or unreadable targets are never revealed.
|
|
17
|
+
- **Block SDK.** Define a block once with `defineBlock` (`magic-editor-x/blocks`), register it on the server and in the admin, and it is sanitised, preset-checked, collaborative and rendered everywhere.
|
|
18
|
+
- **Media.** Gallery, video and audio blocks from the Media Library (alternative texts, captions, poster, WebVTT tracks, no autoplay) and a focal point for images.
|
|
19
|
+
- **Templates, patterns and synced blocks.** Reusable starting content and block sequences per field or preset, inserted from the editor toolbar; synced blocks are edited in one place and every field that references them shows the change.
|
|
20
|
+
- **In-field preview.** The rendered output of the field next to the editor (toolbar or Ctrl/Cmd+Alt+P), also for read-only users.
|
|
21
|
+
- **Block comments.** Threads per block with reply, resolve and reopen, live across servers, with their own permissions.
|
|
22
|
+
- **Structure.** A table of contents block with stable heading anchors, and mentions of other entries.
|
|
23
|
+
- **Assistants (off until enabled).** AI alternative text for images (image and gallery blocks), whole-field translate and summarize, and a LanguageTool grammar check (self-hosted or hosted).
|
|
24
|
+
- **Operations.** Scheduled external link checks (one process in a cluster runs each check), code blocks with line numbers and a copy button in the renderers, and a performance benchmark in CI.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Package exports `magic-editor-x/react`, `magic-editor-x/vue` and `magic-editor-x/blocks`; render functions `renderTree`, `serializeNodes`, `enhanceCodeBlocks`, `copyText`; render options `code`, `focalPoint`, `headingIds`, `toc`, `blocks` and `synced`. `vue` (`^3.5.0`) is an optional peer dependency; the React peer range is `^18.0.0 || ^19.0.0`.
|
|
29
|
+
- Content API query parameter `mex` (registered with `strapi.contentAPI.addQueryParams`, so it also passes with `api.rest.strictParams`); GraphQL fields `<field>Rendered(format: HTML|TEXT|MARKDOWN)` and `<field>Resolved` when `@strapi/plugin-graphql` is installed; service `references.transform`. Synced blocks are expanded in this output.
|
|
30
|
+
- Blocks `gallery`, `video`, `audio`, `toc` and `synced`; `focalPoint` on `image` data and gallery images; mention links (`data-mex-mention="true"`).
|
|
31
|
+
- Templates and block patterns (content type `plugin::magic-editor-x.template`, `kind: 'template' | 'pattern'`) with Settings > Magic Editor X > Templates, the "Insert template" dialog, "Save as pattern" for selected blocks and "Save content as template".
|
|
32
|
+
- Synced blocks: template rows with `kind: 'synced'`, inserted as `{ type: 'synced', data: { ref } }` from the "Insert template" dialog, with "Edit source" and "Detach" in the editor and a usage count in Settings (`GET /magic-editor-x/templates/:id/usage`).
|
|
33
|
+
- In-field preview of the rendered field (toolbar button, Ctrl/Cmd+Alt+P).
|
|
34
|
+
- Block comments (content type `plugin::magic-editor-x.comment`) with the Comments panel and per-block markers.
|
|
35
|
+
- AI alternative text suggestions for image blocks and gallery images (`POST /magic-editor-x/ai/image/alt-text`), whole-field translate and summarize (`POST /magic-editor-x/ai/field/:action`) and the LanguageTool grammar check (`POST /magic-editor-x/grammar/check`).
|
|
36
|
+
- Permissions `comments.read`, `comments.write`, `comments.moderate`, `templates.manage` and `grammar.use`.
|
|
37
|
+
- Admin routes for comments, templates (including usage), the link report and the link schedule, AI alternative text and field actions, the grammar check and the LanguageTool connection test (see the README route table).
|
|
38
|
+
- Config keys `comments.enabled`, `comments.perMinute`, `qualityChecks.externalLinks.allowPrivateOrigins`, `qualityChecks.externalLinks.schedule`, `languageTool.allowPrivateBaseUrl`, `languageTool.requestsPerMinute`, `languageTool.timeoutMs`; settings `ai.allowImages`, `ai.allowFieldActions` and `languageTool`.
|
|
39
|
+
- Quality rules `video-no-captions` and `toc-no-headings`; `npm run bench`.
|
|
40
|
+
- Custom field option `disableGrammar` (Content-Type Builder > Advanced settings): the field shows no "Check grammar" button and `POST /magic-editor-x/grammar/check` answers 403 for it, so its text is never sent to LanguageTool. It is independent of `disableAi`.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- Block select controls (gallery layout and columns, caption track kind, table of contents levels and style, code language, custom block selects) look like Strapi Design System selects in light and dark mode.
|
|
45
|
+
- The editor stylesheet is added once per page instead of once per field, which removes multi-second freezes when opening or leaving edit views with several editor fields.
|
|
46
|
+
- Heading ids `mex-h-<blockId>` are written when the document has a table of contents (or with `headingIds: true`). Without a `toc` block and without the new options, `renderHtml` output is the same as in 2.2.
|
|
47
|
+
- Code blocks keep a valid language that is not in the editor's list instead of resetting it to `plaintext`; one language list (`shared/code-languages.mjs`) serves the editor, the highlighting and the renderers.
|
|
48
|
+
- The image caption in the editor follows in normal flow instead of overlapping the controls below the image.
|
|
49
|
+
- The 2.3 built-in block names (`toc`, `gallery`, `video`, `audio`, `synced`) and the `mention` tool never change the stored data of an existing custom block with the same name: it keeps its own editor tool, sanitising, rendering and API output, byte for byte as in 2.2. Built-in blocks of these types store the marker `_mex: 1` in their data to tell them apart; new custom blocks cannot use these names.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- Pressing Enter on a block select (gallery layout, table of contents levels, code language, custom block selects) submitted the Content Manager form.
|
|
54
|
+
- Text typed into an editor field right after saving a new entry (or while the edit view was still loading) reached the editor but not the form, so Save stayed disabled and the edit could be lost. The field now reports edits made while it starts and marks its holder with `data-mex-ready="true"` when typing is safe.
|
|
55
|
+
- Collaboration: edits re-applied after a room compaction or a reconnect could split another person's text typed at the same spot (for example two inserts became interleaved). Re-applied inserts now stay whole (present since 2.1).
|
|
56
|
+
- Version history: blocks whose tunes differed only in key order were reported as changed; tune changes are now shown readably ("Alignment: left → center").
|
|
57
|
+
- Version history, live collaboration and the link report answered 404 for editor fields inside components (MEX-23-12).
|
|
58
|
+
- Admin error handling read no HTTP status from Strapi's fetch client errors, so the 400 and 404 branches of the editor and the settings pages never ran (`readApiError`).
|
|
59
|
+
- Seeding a live room was quadratic in the number of blocks (5,000 blocks: about 467 ms to 75 ms).
|
|
60
|
+
- Editor.js dropped internal-link references from alert, warning and toggle fields on save.
|
|
61
|
+
- The editor hint said Tab chooses a block; in Editor.js 2.31 it is "/".
|
|
62
|
+
|
|
63
|
+
### Security
|
|
64
|
+
|
|
65
|
+
- See [docs/security-audit-2.3.md](./docs/security-audit-2.3.md): API output and reference resolution (MEX-23-01, MEX-23-02), React/Vue renderers (MEX-23-03), block SDK (MEX-23-04), media blocks (MEX-23-05), mentions (MEX-23-06), block comments (MEX-23-07), scheduled link check (MEX-23-08), AI alternative text and field actions (MEX-23-09), LanguageTool (MEX-23-10), templates and preview (MEX-23-11), synced blocks (MEX-23-14), component field permissions (MEX-23-12) and live room seeding (MEX-23-13).
|
|
66
|
+
|
|
67
|
+
### Migration
|
|
68
|
+
|
|
69
|
+
- No action needed. Rebuild the admin (`npm run build`) after updating.
|
|
70
|
+
- Grant the new permissions to roles that should comment (`comments.read`, `comments.write`, `comments.moderate`), manage templates, patterns and synced blocks (`templates.manage`) or use the grammar check (`grammar.use`).
|
|
71
|
+
- Features that send content to a provider stay off until the owner turns them on in Settings (`ai.allowImages`, `ai.allowFieldActions`, LanguageTool). The scheduled link check needs `qualityChecks.externalLinks.enabled` and `qualityChecks.externalLinks.schedule.enabled` in `config/plugins`.
|
|
72
|
+
- Custom blocks created before 2.3 under the names `toc`, `gallery`, `video`, `audio`, `synced` or `mention` need nothing: their stored data is never rewritten and they stay editable under their name. New custom blocks cannot use these names.
|
|
73
|
+
- Editor.js stays at 2.31.7: 2.32.0 is still a release candidate on npm (`next` tag 2.32.0-rc.3, no final release).
|
|
74
|
+
|
|
3
75
|
# [2.2.0](https://github.com/Schero94/Magic-Editor-X/compare/v2.1.0...v2.2.0) (2026-11-12)
|
|
4
76
|
|
|
5
77
|
|