Skip to content

[Editor] Add ux-editor with CKEditor, EditorJS and GrapesJS bridges#3687

Open
makraz wants to merge 35 commits into
symfony:3.xfrom
makraz:feat/ux-editor-core
Open

[Editor] Add ux-editor with CKEditor, EditorJS and GrapesJS bridges#3687
makraz wants to merge 35 commits into
symfony:3.xfrom
makraz:feat/ux-editor-core

Conversation

@makraz

@makraz makraz commented Jun 20, 2026

Copy link
Copy Markdown
Contributor
Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? yes
Issues
License MIT

symfony/ux-editor adds a single Symfony form field (EditorType) on top of
multiple content-authoring editors — WYSIWYG, block and page-builder — behind
one consistent API.

The core package is editor-agnostic and provides:

  • a polymorphic content model: EditorContentInterface with HtmlContent,
    BlockContent and PageContent, plus an EditorContentFormat enum;
  • EditorType form abstraction with data transformers;
  • Doctrine custom types (editor_html, editor_blocks, editor_page);
  • a signed upload pipeline (EditorUploadController, SignedUploadUrlGenerator,
    EditorUploadHandlerInterface, local handler + registry);
  • a ux_editor_render Twig function (HTML sanitized, blocks via registry, page
    rendered in a sandboxed iframe);
  • a LiveEditor trait for debounced autosave with LiveComponent;
  • a debug:ux-editor console command and a WebProfiler data collector.

Concrete editors plug in through BridgeInterface + BridgeRegistry. This PR
also includes three bridges as separate composer + npm sub-packages:

  • symfony/ux-editor-ckeditor — CKEditor 5 (WYSIWYG family)
  • symfony/ux-editor-editorjs — EditorJS (block family)
  • symfony/ux-editor-grapesjs — GrapesJS (page-builder family)

PHP and JS test suites are included and passing. Documentation lives in
src/Editor/doc/.

makraz added 30 commits June 20, 2026 17:17
- Add .symfony.bundle.yaml and .gitattributes
- Drop feature-branch composer branch-alias, add author
- Fix assets/package.json symfony block (importmap)
- Expand README with standard sub-tree-split boilerplate
- Support non-controller exports and nested controllers in build
- Rebuild dist
@carsonbot carsonbot added Documentation Improvements or additions to documentation Feature New Feature Status: Needs Review Needs to be reviewed labels Jun 20, 2026
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Editor
content/EditorContent.d.ts Added 412 B / 246 B
content/EditorContent.js Added 402 B / 230 B
controller-BoYyK5_A.js Added 3.4 kB / 1.2 kB
controller.d.ts Added 1.25 kB / 508 B
controller.js Added 111 B / 109 B
format/block_controller.d.ts Added 446 B / 277 B
format/block_controller.js Added 249 B / 191 B
format/page_builder_controller.d.ts Added 409 B / 257 B
format/page_builder_controller.js Added 368 B / 238 B
format/wysiwyg_controller.d.ts Added 387 B / 251 B
format/wysiwyg_controller.js Added 494 B / 317 B
live/live-editor.d.ts Added 262 B / 206 B
live/live-editor.js Added 541 B / 298 B
upload/SignedUploadClient.d.ts Added 421 B / 255 B
upload/SignedUploadClient.js Added 684 B / 403 B
Editor (Bridge CKEditor)
controller.d.ts Added 511 B / 306 B
controller.js Added 1.25 kB / 559 B
Editor (Bridge EditorJS)
controller.d.ts Added 451 B / 286 B
controller.js Added 1.57 kB / 679 B
tool-registry.d.ts Added 151 B / 159 B
tool-registry.js Added 153 B / 149 B
Editor (Bridge GrapesJS)
controller.d.ts Added 518 B / 317 B
controller.js Added 2.16 kB / 743 B

@makraz makraz changed the title [Editor] Add symfony/ux-editor with CKEditor, EditorJS and GrapesJS bridges [Editor] Add ux-editor with CKEditor, EditorJS and GrapesJS bridges Jun 20, 2026
makraz added 4 commits June 20, 2026 17:50
- Regenerate pnpm-lock.yaml with editor + bridge dependencies (frozen-lockfile)
- Add 'symfony-ux' keywords and fix files: ["dist"] in npm package.json files
- Fix DOCtor-RST: use '::' over code-block:: php, 'javascript' over 'js',
  'applications' over 'apps', matching title underline
- Apply @symfony coding standards (php-cs-fixer)
- Add psr/log ^3 to require (used by AbstractEditorConfig); fixes
  --prefer-lowest builds that pulled the incompatible psr/log 1.x
- Apply oxfmt formatting to TypeScript sources and config files
Bridges require symfony/ux-editor ^0.1|^1.0; the dev-feat/ux-editor-core =>
0.1.x-dev alias is what lets the monorepo path package satisfy that
constraint under composer (incl. --prefer-lowest). Fixes lowest-deps CI.
… path repos

- Doctrine tests: mock AbstractPlatform instead of instantiating SqlitePlatform
  (renamed to SQLitePlatform in doctrine/dbal 4); production types already use
  the version-agnostic AbstractPlatform
- Remove per-bridge 'repositories' path config with symlink:false; the monorepo
  build-packages.php injects path repos (symlinked), and the forced copy was
  mirroring src/Editor/vendor temp files ("Unable to guess file type")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Feature New Feature Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants