Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Editorjs Bundle

Editorjs Bundle Laravel Package

darylseven/editorjs-bundle

Symfony bundle integrating Editor.js with Symfony Forms and Twig. Adds an EditorjsType form field, configurable editor setups, and a Twig helper to render/init the editor. Includes example config and JS init (Encore/webpack).

View on GitHub
Deep Wiki
Context7

Symfony bundle for Editor.js

Frequently asked questions about Editorjs Bundle
Does this bundle work with Symfony 8 and its latest form system?
Yes, the bundle is optimized for Symfony 8 and leverages its form system, Twig 3+, and modern PHP features. However, test it with Symfony 8’s latest form components (e.g., FormBuilder changes) as some edge cases may require adjustments.
How do I install and configure this bundle for Symfony 8?
Run `composer require tbmatuka/editorjs-bundle`, enable it in `bundles.php`, and add the form theme to your Twig config. Copy the example config (`examples/editorjs.yaml`) and include the JS init file via Encore/Webpack.
What frontend setup is required for Editor.js to work?
The bundle requires Encore/Webpack for JS asset management. Install `@editorjs/editorjs` and plugins via npm, then import the example JS file into your main JS bundle. CDN or inline loading isn’t officially supported.
How do I handle Editor.js JSON output in Symfony 8 forms?
The bundle returns decoded JSON as an array in Symfony forms. For storage, manually serialize/deserialize the data (e.g., using Doctrine’s `json` type or custom accessors). Add validation via form constraints or Doctrine annotations.
Can I customize the Twig template for Editor.js in Symfony 8?
The bundle provides a base Twig template (`editorjs_widget.html.twig`), but overriding it for Symfony 8’s Twig 3+ may require adjustments. Extend or replace the template in your project’s `templates` directory.
Are there alternatives to this bundle for Symfony 8?
For Symfony 8, consider `vich/uploader-bundle` + custom CKEditor integration or `api-platform/core` with a frontend framework like React/Vue for dynamic rich-text editing. This bundle is best for form-centric Symfony apps.
How do I add Editor.js plugins like headers or images?
Install plugins via npm (e.g., `@editorjs/header`, `@editorjs/image`). Configure them in your JS init file and include them in the `tools` array. Ensure plugins are imported in your Encore/Webpack setup.
Will this bundle work with PHP 8.1+ and Symfony 8’s latest features?
Yes, the bundle supports PHP 8.1+ and Symfony 8, including named arguments and union types. However, verify compatibility with Symfony 8’s form system and Twig 3+ template inheritance.
Is there built-in validation for Editor.js output in Symfony forms?
No, the bundle doesn’t include validation. Manually validate the JSON output using Symfony’s form constraints, Doctrine annotations, or custom validators to enforce rules like max length or allowed block types.
What should I do if I encounter issues with the bundle in production?
Check the GitHub repo for open issues or create a new one. Since the bundle has low adoption, test thoroughly in staging and monitor for edge cases. Consider forking the repo if critical fixes are needed.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
symfony/ai-symfony-mate-extension
aashan/pimcore-mcp-bundle
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin