{"id":41044231,"url":"https://github.com/Mati365/ckeditor5-symfony","last_synced_at":"2026-01-31T16:01:15.233Z","repository":{"id":329734154,"uuid":"1120527039","full_name":"Mati365/ckeditor5-symfony","owner":"Mati365","description":"CKEditor 5 Integration for Symfony A modern, powerful rich text editor integration for Symfony applications. Easily configure builds, manage file uploads, and use custom toolbar sets directly within your Twig templates and Form types.","archived":false,"fork":false,"pushed_at":"2026-01-12T08:49:10.000Z","size":685,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-16T16:48:55.111Z","etag":null,"topics":["ckeditor5","form","php","rich-text-editor","symfony","wysiwyg"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mati365.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T12:11:44.000Z","updated_at":"2026-01-14T02:53:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mati365/ckeditor5-symfony","commit_stats":null,"previous_names":["mati365/ckeditor5-symfony"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Mati365/ckeditor5-symfony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mati365%2Fckeditor5-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mati365%2Fckeditor5-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mati365%2Fckeditor5-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mati365%2Fckeditor5-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mati365","download_url":"https://codeload.github.com/Mati365/ckeditor5-symfony/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mati365%2Fckeditor5-symfony/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28947567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ckeditor5","form","php","rich-text-editor","symfony","wysiwyg"],"created_at":"2026-01-22T11:00:21.332Z","updated_at":"2026-01-31T16:01:15.227Z","avatar_url":"https://github.com/Mati365.png","language":"PHP","funding_links":[],"categories":["Integrations"],"sub_categories":[],"readme":"# ckeditor5-symfony\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg?style=flat-square)](http://makeapullrequest.com)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/mati365/ckeditor5-symfony?style=flat-square)\n[![GitHub issues](https://img.shields.io/github/issues/mati365/ckeditor5-symfony?style=flat-square)](https://github.com/Mati365/ckeditor5-symfony/issues)\n[![TS Coverage](https://img.shields.io/badge/TypeScript-100%25-brightgreen?logo=typescript\u0026logoColor=white\u0026style=flat-square)](https://app.codecov.io/gh/Mati365/ckeditor5-symfony/tree/main/npm_package%2Fsrc)\n[![PHP Coverage](https://img.shields.io/badge/PHP-100%25-brightgreen?logo=php\u0026logoColor=white\u0026style=flat-square)](https://app.codecov.io/gh/Mati365/ckeditor5-symfony/tree/main/src)\n![NPM Version](https://img.shields.io/npm/v/ckeditor5-symfony?style=flat-square)\n![Packagist Version](https://img.shields.io/packagist/v/mati365/ckeditor5-symfony?style=flat-square\u0026color=%239245ba)\n\nCKEditor 5 for Symfony \u003e=6.4.x — a lightweight WYSIWYG editor integration for Symfony. Easy to set up, it supports custom builds, dynamic loading, and localization. The package includes JavaScript and CSS assets, making it simple to integrate CKEditor 5 into your Symfony applications.\n\n\u003e [!IMPORTANT]\n\u003e This integration is unofficial and not maintained by CKSource. For official CKEditor 5 documentation, visit [ckeditor.com](https://ckeditor.com/docs/ckeditor5/latest/). If you encounter any issues in editor, please report them on the [GitHub repository](https://github.com/ckeditor/ckeditor5/issues).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/intro-classic-editor.png\" alt=\"CKEditor 5 Classic Editor in Symfony (PHP) application\"\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [ckeditor5-symfony](#ckeditor5-symfony)\n  - [Table of Contents](#table-of-contents)\n  - [Installation 🚀](#installation-)\n  - [Usage 📖](#usage-)\n  - [Basic Usage 🏁](#basic-usage-)\n    - [Simple Editor ✏️](#simple-editor-️)\n    - [Watchdog prop 🐶](#watchdog-prop-)\n      - [Disabling the watchdog 🚫](#disabling-the-watchdog-)\n  - [Editor Types 🖊️](#editor-types-️)\n    - [Classic editor 📝](#classic-editor-)\n    - [Multiroot editor 🌳](#multiroot-editor-)\n    - [Inline editor 📝](#inline-editor-)\n    - [Decoupled editor 🌐](#decoupled-editor-)\n  - [Forms Integration 🧾](#forms-integration-)\n    - [Symfony Form Type 🧑‍💻](#symfony-form-type-)\n  - [Configuration ⚙️](#configuration-️)\n    - [Custom Presets 🧩](#custom-presets-)\n    - [Dynamic configuration 🎯](#dynamic-configuration-)\n    - [Providing the License Key 🗝️](#providing-the-license-key-️)\n    - [Referencing DOM Elements in Config 🏷️](#referencing-dom-elements-in-config-️)\n      - [How to use 🛠️](#how-to-use-️)\n      - [Example 📄](#example-)\n  - [Localization 🌍](#localization-)\n    - [CDN Translation Loading 🌐](#cdn-translation-loading-)\n      - [AssetsMapper local translations assignment 📦](#assetsmapper-local-translations-assignment-)\n      - [Global CDN translation loading ☁️](#global-cdn-translation-loading-️)\n    - [Global Translation Config 🛠️](#global-translation-config-️)\n      - [AssetsMapper translations installation 📥](#assetsmapper-translations-installation-)\n      - [Direct CDN translations configuration ⚙️](#direct-cdn-translations-configuration-️)\n    - [Custom translations 🌐](#custom-translations-)\n  - [Custom plugins 🧩](#custom-plugins-)\n  - [Context 🤝](#context-)\n    - [Basic usage 🔧](#basic-usage--1)\n    - [Custom context translations 🌐](#custom-context-translations-)\n  - [Watch registered editors 👀](#watch-registered-editors-)\n    - [Wait for particular editor to be registered ⏳](#wait-for-particular-editor-to-be-registered-)\n  - [Installer command options ⚙️](#installer-command-options-️)\n  - [Development ⚙️](#development-️)\n    - [Running Tests 🧪](#running-tests-)\n  - [Psst... 👀](#psst-)\n  - [Trademarks 📜](#trademarks-)\n  - [License 📜](#license-)\n\n## Installation 🚀\n\n1. **Install the package:**\n\n   ```bash\n   composer require mati365/ckeditor5-symfony\n   ```\n\n2. **Enable the bundle:**\n\n   ```php\n   // config/bundles.php\n\n   return [\n     // ...\n     Mati365\\CKEditor5Symfony\\CKEditorBundle::class =\u003e ['all' =\u003e true],\n   ];\n   ```\n\n3. **Run the installer:**\n\n   Choose the distribution method that best fits your needs:\n\n   **🏠 Self-hosted (Recommended)**\n   Bundles assets locally. No Node.js required.\n\n   ```bash\n   php bin/console ckeditor5:assets-mapper:install\n   ```\n\n   **📡 CDN Distribution**\n   Loads assets from CKSource CDN.\n\n   ```bash\n   php bin/console ckeditor5:assets-mapper:install --distribution=cloud\n   ```\n\n   _For CDN, add `CKEDITOR5_LICENSE_KEY=\"your-key\"` to your `.env` file._\n\n   \u003e 💡 **Tip:** Add `--premium` to either command to install premium features (requires a valid license).\n\n   For more options, see [Installer command options](#installer-command-options-️).\n\n## Usage 📖\n\nTo use CKEditor 5 in your Twig templates, simply call the `cke5_editor()` function:\n\n```twig\n{{ cke5_editor('Your content here') }}\n```\n\nIf you don't use `AssetsMapper`, and your distribution is set to `cloud`, make sure to include the assets using `cke5_cloud_assets()` in your `\u003chead\u003e` section.\n\n```twig\n{{ cke5_cloud_assets() }}\n```\n\nThis will render a classic editor with the provided content.\nFor more advanced usage, check the playground examples.\n\n## Basic Usage 🏁\n\nGet started with the most common usage patterns. These examples show how to render editors in your templates.\n\n### Simple Editor ✏️\n\nCreate a basic editor with default toolbar and features.\n\n```twig\n{{ cke5_editor(\n  content: '\u003cp\u003eInitial content\u003c/p\u003e',\n  editorType: 'classic',\n  editableHeight: 300\n) }}\n```\n\n### Watchdog prop 🐶\n\nBy default, the editor uses a built-in watchdog mechanism to automatically restart the editor if it crashes (e.g., due to a JavaScript error). The watchdog periodically saves the editor's content and restores it after a crash, minimizing the risk of data loss for users.\n\n#### Disabling the watchdog 🚫\n\nThe watchdog is enabled by default. To disable it, set the `watchdog` argument to `false`:\n\n```twig\n{{ cke5_editor(\n  content: '\u003cp\u003eInitial content\u003c/p\u003e',\n  editorType: 'classic',\n  watchdog: false\n) }}\n```\n\n## Editor Types 🖊️\n\nCKEditor 5 Symfony supports four distinct editor types, each designed for specific use cases. Choose the one that best fits your application's layout and functionality requirements.\n\n### Classic editor 📝\n\nTraditional WYSIWYG editor with a fixed toolbar above the editing area. Best for standard content editing scenarios like blog posts, articles, or forms.\n\n![CKEditor 5 Classic Editor in Symfony application](docs/classic-editor-with-toolbar.png)\n\n```twig\n{{ cke5_editor(\n  content: '\u003cp\u003eInitial content here\u003c/p\u003e',\n  editorType: 'classic',\n  editableHeight: 300\n) }}\n```\n\n### Multiroot editor 🌳\n\nAdvanced editor supporting multiple independent editable areas within a single editor instance. Perfect for complex layouts like page builders, newsletters, or multi-section content management.\n\n![CKEditor 5 Multiroot Editor in Symfony application](docs/multiroot-editor.png)\n\n```twig\n{# Editor container #}\n{{ cke5_editor(editorType: 'multiroot') }}\n\n{# Shared toolbar #}\n{{ cke5_ui_part('toolbar') }}\n\n{# Multiple editable areas #}\n\u003cdiv class=\"row\"\u003e\n  \u003cdiv class=\"col\"\u003e\n    \u003ch2\u003eHeader\u003c/h2\u003e\n    {{ cke5_editable(rootName: 'header', content: 'Header content', class: 'border') }}\n  \u003c/div\u003e\n  \u003cdiv class=\"col\"\u003e\n    \u003ch2\u003eContent\u003c/h2\u003e\n    {{ cke5_editable(rootName: 'content', content: 'Main content', class: 'border') }}\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Inline editor 📝\n\nMinimalist editor that appears directly within content when clicked. Ideal for in-place editing scenarios where the editing interface should be invisible until needed.\n\n![CKEditor 5 Inline Editor in Symfony application](docs/inline-editor.png)\n\n```twig\n{{ cke5_editor(\n  content: '\u003cp\u003eClick here to edit this content\u003c/p\u003e',\n  editorType: 'inline',\n  editableHeight: 300\n) }}\n```\n\n**Note:** Inline editors don't work with `\u003ctextarea\u003e` elements and may not be suitable for traditional form scenarios.\n\n### Decoupled editor 🌐\n\nFlexible editor where toolbar and editing area are completely separated. Provides maximum layout control for custom interfaces and complex applications.\n\n![CKEditor 5 Decoupled Editor in Symfony application](docs/decoupled-editor.png)\n\n```twig\n{# Decoupled editor container #}\n{{ cke5_editor(id: 'decoupled-editor', editorType: 'decoupled') }}\n\n\u003cdiv class=\"editor-container\"\u003e\n  {# Toolbar can be placed anywhere #}\n  {{ cke5_ui_part('toolbar') }}\n\n  {# Editable area with custom styling #}\n  {{ cke5_editable(\n    content: '\u003cp\u003eInitial content here\u003c/p\u003e',\n    class: 'border p-4 rounded',\n    editableHeight: 300\n  ) }}\n\u003c/div\u003e\n```\n\n## Forms Integration 🧾\n\nSeamlessly integrate CKEditor 5 with Symfony Forms. The bundle provides a `CKEditor5Type` that facilitates easy integration.\n\n### Symfony Form Type 🧑‍💻\n\nUse `CKEditor5Type` in your form class to render the editor.\n\n```php\nuse Mati365\\CKEditor5Symfony\\Form\\Type\\CKEditor5Type;\n// ...\n\n$builder-\u003eadd('content', CKEditor5Type::class, [\n  'label' =\u003e 'Article Content',\n  'required' =\u003e true,\n  'attr' =\u003e ['row_attr' =\u003e ['class' =\u003e 'text-editor']],\n]);\n```\n\nThen in your template:\n\n```twig\n{{ form_row(form.content) }}\n```\n\nThe editor automatically synchronizes its content with the underlying hidden input field upon form submission.\n\n## Configuration ⚙️\n\nYou can configure the editor _presets_ in your `config/packages/ckeditor5.yaml` file. The default preset is `default`, which provides a basic configuration with a toolbar and essential plugins. The preset is a map that contains the editor configuration, including the toolbar items and plugins. There can be multiple presets, and you can switch between them by passing the `preset` keyword argument to the `cke5_editor` function.\n\n### Custom Presets 🧩\n\nIn order to override the default preset or add custom presets, you can add the following configuration:\n\n```yaml\n# config/packages/ckeditor5.yaml\n\nckeditor5:\n  presets:\n    minimal:\n      editorType: classic\n      config:\n        toolbar: [bold, italic, link]\n        plugins: [Bold, Italic, Link, Essentials, Paragraph]\n\n      # Only if don't use AssetsMapper and using cloud distribution. Otherwise, this section is\n      # automatically configured during `ckeditor5:assets-mapper:install` command.\n      cloud:\n        version: 46.0.0\n        premium: true\n        translations: [pl]\n        ckbox:\n          version: 1.0.0\n\n    full:\n      editorType: classic\n      config:\n        toolbar:\n          - heading\n          - '|'\n          - bold\n          - italic\n          - underline\n          - '|'\n          - link\n          - insertImage\n          - insertTable\n          - '|'\n          - bulletedList\n          - numberedList\n          - blockQuote\n        plugins:\n          - Heading\n          - Bold\n          - Italic\n          - Underline\n          - Link\n          - ImageBlock\n          - ImageUpload\n          - Table\n          - List\n          - BlockQuote\n          - Essentials\n          - Paragraph\n```\n\nIn template:\n\n```twig\n{{ cke5_editor(content: '\u003cp\u003eSimple editor\u003c/p\u003e', preset: 'minimal') }}\n```\n\nThe default one is specified here [src/DependencyInjection/DefaultConfiguration.php](src/DependencyInjection/DefaultConfiguration.php).\n\n### Dynamic configuration 🎯\n\nYou can also override configuration at runtime by passing `config` or `mergeConfig` arguments to the editor function. This is useful if you want to change the editor configuration based on user input or other conditions.\n\n```twig\n{# Override configuration (shallow merge) #}\n{{ cke5_editor(\n    content: 'Content',\n    config: { 'toolbar': ['bold', 'italic'] }\n) }}\n\n{# Merge configuration (deep merge) #}\n{{ cke5_editor(\n    content: 'Content',\n    mergeConfig: { 'toolbar': { 'items': ['bold'] } }\n) }}\n```\n\n### Providing the License Key 🗝️\n\nCKEditor 5 requires a license key when using the official CDN or premium features. You can provide the license key in two simple ways:\n\n1. **Environment variable**: Set the `CKEDITOR5_LICENSE_KEY` environment variable in your `.env` file. This is the easiest and most common way.\n2. **Preset config**: You can also set the license key directly in your preset configuration in `config/packages/ckeditor5.yaml`:\n\n   ```yaml\n   ckeditor5:\n     presets:\n       custom:\n         # ...\n         licenseKey: your-license-key-here\n   ```\n\nIf you use CKEditor 5 under the GPL license, you do not need to provide a license key. However, if you choose to set one, it must be set to `GPL`.\n\nIf both are set, the preset config takes priority. For more details, see the [CKEditor 5 licensing guide](https://ckeditor.com/docs/ckeditor5/latest/getting-started/licensing/license-and-legal.html).\n\n### Referencing DOM Elements in Config 🏷️\n\nYou can reference DOM elements directly in your editor configuration using the special `{ $element: \"selector\" }` format. This is useful when you want to attach the editor's UI parts (like toolbars or editable areas) to specific elements in your HTML.\n\n#### How to use 🛠️\n\n- In your config object, use `{ \"$element\": \"CSS_SELECTOR\" }` wherever a DOM element is expected.\n- The selector will be resolved to the actual DOM element before initializing the editor.\n\n#### Example 📄\n\n```yaml\n# config/packages/ckeditor5.yaml\n\nckeditor5:\n  presets:\n    # ... other presets\n    minimal:\n      config:\n        # ... other config\n        yourPlugin:\n          toolbar: {$element: '#my-toolbar'}\n          editable: {$element: '#my-editable'}\n```\n\nThis will find the elements with IDs `my-toolbar` and `my-editable` in the DOM and use them for the editor's UI.\n\n⚠️ If the element is not found, a warning will be shown in the console.\n\n## Localization 🌍\n\nSupport multiple languages in the editor UI and content. Learn how to load translations via CDN or configure them globally.\n\n### CDN Translation Loading 🌐\n\nDepending on your setup, you can preload translations via CDN.\n\n#### AssetsMapper local translations assignment 📦\n\nIf you want to load a specific language for the editor UI, you can specify the `language` argument in the `cke5_editor()` function:\n\n```twig\n{{ cke5_editor(\n    language: 'pl',\n    content: '\u003cp\u003eContent in English, UI in Polish\u003c/p\u003e'\n) }}\n```\n\nRemember, that this only works if you have installed the translations using the `ckeditor5:assets-mapper:install` command with the `--translations` option.\n\n```bash\nphp bin/console ckeditor5:assets-mapper:install --translations=pl,de,fr\n```\n\n#### Global CDN translation loading ☁️\n\nIf you don't use `AssetsMapper`, you can load translations directly from CDN by specifying them in the preset config or during installation. See [Global Translation Config](#global-translation-config-️) for more details.\n\nIf you want to specify it in the template,you can use `cke5_cloud_assets()` function:\n\n```twig\n{# It'll load translations for Polish, German, and French from CDN #}\n{{ cke5_cloud_assets(translations: ['pl', 'de', 'fr']) }}\n```\n\n### Global Translation Config 🛠️\n\n#### AssetsMapper translations installation 📥\n\nYou can fetch translations globally by specifying them in the `ckeditor5:assets-mapper:install` command:\n\n```bash\nphp bin/console ckeditor5:assets-mapper:install --translations=pl,de,fr\n```\n\n#### Direct CDN translations configuration ⚙️\n\nYou can also configure translations globally in your configuration file. This is useful if you want to load translations for multiple languages at once or set a default language for the editor. Keep in mind that this configuration is only used when loading translations via CDN. If you are using self-hosted setup, translations are handled by your bundler automatically.\n\n```yaml\n# config/packages/ckeditor5.yaml\n\nckeditor5:\n  presets:\n    custom:\n      cloud:\n        translations: [pl, de, fr]\n```\n\n**Note:** For self-hosted setups, translations are handled by your bundler automatically.\n\n### Custom translations 🌐\n\nYou can also provide custom translations for the editor. This is useful if you want to override existing translations or add new ones. Custom translations can be provided in the preset configuration.\n\n```yaml\n# config/packages/ckeditor5.yaml\n\nckeditor5:\n  presets:\n    custom:\n      # ...\n      customTranslations:\n        en:\n          Bold: Custom Bold\n          Italic: Custom Italic\n        pl:\n          Bold: Pogrubiony\n          Italic: Kursywa\n```\n\n## Custom plugins 🧩\n\nTo register a custom plugin, use the `CustomEditorPluginsRegistry`.\n\n```javascript\nimport { CustomEditorPluginsRegistry as Registry } from '@mati365/ckeditor5-symfony';\n\nconst unregister = Registry.the.register('MyCustomPlugin', async () =\u003e {\n  // It's recommended to use lazy import to\n  // avoid bundling ckeditor code in your application bundle.\n  const { Plugin } = await import('ckeditor5');\n\n  return class extends Plugin {\n    static get pluginName() {\n      return 'MyCustomPlugin';\n    }\n\n    init() {\n      console.log('MyCustomPlugin initialized');\n      // Custom plugin logic here\n    }\n  };\n});\n```\n\nIn order to use the plugin you need to extend your config in `config/packages/ckeditor5.yaml`:\n\n```yaml\nckeditor5:\n  presets:\n    custom:\n      config:\n        plugins: [MyCustomPlugin, Essentials, Paragraph]\n        # ... other config options\n```\n\nIt must be called before the editor is initialized. You can unregister the plugin later by calling the returned function:\n\n```javascript\nunregister();\n// or CustomEditorPluginsRegistry.the.unregister('MyCustomPlugin');\n```\n\nIf you want to de-register all registered plugins, you can use the `unregisterAll` method:\n\n```javascript\nimport { CustomEditorPluginsRegistry } from '@mati365/ckeditor5-symfony';\n\nCustomEditorPluginsRegistry.the.unregisterAll();\n```\n\n## Context 🤝\n\nThe **context** feature is designed to group multiple editor instances together, allowing them to share a common context. This is particularly useful in collaborative editing scenarios, where users can work together in real time. By sharing a context, editors can synchronize features such as comments, track changes, and presence indicators across different editor instances. This enables seamless collaboration and advanced workflows in your application.\n\nFor more information about the context feature, see the [CKEditor 5 Context documentation](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/context-and-collaboration-features.html).\n\n![CKEditor 5 Context in Symfony application](docs/context.png)\n\n### Basic usage 🔧\n\nDefine your context in configuration:\n\n```yaml\nckeditor5:\n  contexts:\n    your_context:\n      config:\n        plugins:\n          - CustomContextPlugin\n      watchdogConfig:\n        crashNumberLimit: 20\n```\n\nAnd use it in your template:\n\n```twig\n{# Initialize context #}\n{{ cke5_context(id: 'shared-context', contextPreset: 'your_context') }}\n\n{# Connect editors to context #}\n{{ cke5_editor(content: 'Child A', contextId: 'shared-context') }}\n{{ cke5_editor(content: 'Child B', contextId: 'shared-context') }}\n```\n\nVoila!\n\n### Custom context translations 🌐\n\nDefine your custom translations in the configuration:\n\n```yaml\nckeditor5:\n  contexts:\n    custom:\n      # ...\n      customTranslations:\n        en:\n          Bold: Custom Bold\n          Italic: Custom Italic\n        pl:\n          Bold: Pogrubiony\n          Italic: Kursywa\n```\n\nThese translations will be used in the context's editors, overriding the default translations. They are available through `locale.t` plugin in every context plugin.\n\n## Watch registered editors 👀\n\nYou can watch the registered editors using the `watch` function. This is useful if you want to react to changes in the registered editors, for example, to update the UI or perform some actions when an editor is added or removed.\n\n```javascript\nimport { EditorsRegistry } from '@mati365/ckeditor5-symfony';\n\nconst unregisterWatcher = EditorsRegistry.the.watch((editors) =\u003e {\n  console.log('Registered editors changed:', editors);\n});\n\n// Later, you can unregister the watcher\nunregisterWatcher();\n```\n\n### Wait for particular editor to be registered ⏳\n\nYou can also wait for a specific editor to be registered using the `waitForEditor` function. This is useful if you want to perform some actions after a specific editor is registered.\n\nThis method can be called before the editor is initialized, and it will resolve when the editor is registered.\n\n```javascript\nimport { EditorsRegistry } from '@mati365/ckeditor5-symfony';\n\nEditorsRegistry.the.waitFor('editor1').then((editor) =\u003e {\n  console.log('Editor \"editor1\" is registered:', editor);\n});\n\n// ... init editor somewhere later\n```\n\nThe `id` of the editor must be used to identify the editor. If the editor is already registered, the promise will resolve immediately.\n\n## Installer command options ⚙️\n\nThe `ckeditor5:assets-mapper:install` command supports the following options:\n\n```bash\nphp bin/console ckeditor5:assets-mapper:install --help\n\nDescription:\n  Configure CKEditor5 assets in importmap.php, update base template, and download CKEditor to assets/vendor for cloud or NPM distribution\n\nUsage:\n  ckeditor5:assets-mapper:install [options]\n\nOptions:\n      --distribution=DISTRIBUTION      Distribution type: cloud or npm [default: \"npm\"]\n      --importmap-path=IMPORTMAP-PATH  Path to importmap.php file [default: \"importmap.php\"]\n      --editor-version=EDITOR-VERSION  CKEditor version [default: \"47.3.0\"]\n      --translations=TRANSLATIONS      Comma-separated list of translations [default: \"en\"]\n      --template-path=TEMPLATE-PATH    Path to base template file [default: \"templates/base.html.twig\"]\n      --js-path=JS-PATH                Path to main JS file [default: \"assets/app.js\"]\n      --css-path=CSS-PATH              Path to main CSS file [default: \"assets/styles/app.css\"]\n      --ckbox-version[=CKBOX-VERSION]  CKBox version\n      --ckbox-theme[=CKBOX-THEME]      CKBox theme (light or dark)\n      --premium                        Include premium features\n      --skip-template-update           Skip updating the Twig template\n      --skip-composer-update           Skip updating composer.json\n      --skip-css-update                Skip updating CSS imports\n      --skip-js-update                 Skip updating Jng composer.json\n  -h, --help                           Display help for the given command. When no command is given display help for the list command\n      --silent                         Do not output any message\n  -q, --quiet                          Only errors are displayed. All other output is suppressed\n  -V, --version                        Display this application version\n      --ansi|--no-ansi                 Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction                 Do not ask any interactive question\n  -e, --env=ENV                        The Environment name. [default: \"dev\"]\n      --no-debug                       Switch off debug mode.\n      --profile                        Enables profiling (requires debug).\n  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n\n## Development ⚙️\n\nTo start the development environment, run:\n\n```bash\npnpm run dev\n```\n\nThe playground app will be available at [http://localhost:8000](http://localhost:8000).\n\n### Running Tests 🧪\n\nThe project includes comprehensive PHP unit tests with 100% code coverage requirement:\n\n```bash\n# Run all tests\ncomposer test\n\n# Run tests with coverage report (requires pcov)\ncomposer test:coverage\n```\n\n## Psst... 👀\n\nIf you're looking for similar stuff, check these out:\n\n- [ckeditor5-livewire](https://github.com/Mati365/ckeditor5-livewire)\n  Effortless CKEditor 5 integration for Laravel Livewire. Supports dynamic content, localization, and custom builds with minimal setup.\n\n- [ckeditor5-phoenix](https://github.com/Mati365/ckeditor5-phoenix)\n  Seamless CKEditor 5 integration for Phoenix Framework. Plug \u0026 play support for LiveView forms with dynamic content, localization, and custom builds.\n\n- [ckeditor5-rails](https://github.com/Mati365/ckeditor5-rails)\n  Smooth CKEditor 5 integration for Ruby on Rails. Works with standard forms, Turbo, and Hotwire. Easy setup, custom builds, and localization support.\n\n## Trademarks 📜\n\nCKEditor® is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com/) All rights reserved. For more information about the license of CKEditor® please visit [CKEditor's licensing page](https://ckeditor.com/legal/ckeditor-oss-license/).\n\nThis package is not owned by CKSource and does not use the CKEditor® trademark for commercial purposes. It should not be associated with or considered an official CKSource product.\n\n## License 📜\n\nThis project is licensed under the terms of the [MIT LICENSE](LICENSE).\n\nThis project injects CKEditor 5 which is licensed under the terms of [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html). For more information about CKEditor 5 licensing, please see their [official documentation](https://ckeditor.com/legal/ckeditor-oss-license/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMati365%2Fckeditor5-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMati365%2Fckeditor5-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMati365%2Fckeditor5-symfony/lists"}