diff --git a/README.md b/README.md index 0ffbb88..b055dd4 100644 --- a/README.md +++ b/README.md @@ -34,29 +34,21 @@ ## 🔧 Installation -___ - -Add the package to your Strapi application: - -> ❗ For Strapi v4 use `@_sh/strapi-plugin-ckeditor@strapi-v4-latest` -```bash -npm install @_sh/strapi-plugin-ckeditor -``` - -or +Add the package to your Strapi application: ```bash yarn add @_sh/strapi-plugin-ckeditor ``` -Then build the app: +For Strapi v4: ```bash -npm run build +yarn add @_sh/strapi-plugin-ckeditor@strapi-v4-latest ``` -or +Then, build the app: + ```bash yarn build ``` @@ -77,9 +69,11 @@ yarn build ## ⚙️ Configuration -___ -It is highly recommended to explore [**the official CKEditor5 documentation**](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) and [**the Strapi Custom Field API**](https://docs.strapi.io/developer-docs/latest/development/custom-fields.html#registering-a-custom-field-on-the-server) + +> It is highly recommended to explore [**the official CKEditor5 documentation**](https://ckeditor.com/docs/ckeditor5/latest/features/index.html) and [**the Strapi Custom Field API**](https://docs.strapi.io/developer-docs/latest/development/custom-fields.html#registering-a-custom-field-on-the-server) +> +> To display content from external sources, such as images or videos, in your admin panel, you need to configure your `middlewares.js` file. [**Check the official documentation for details.**](https://docs.strapi.io/dev-docs/configurations/middlewares#security) The plugin configuration should be defined in `your-app/config/ckeditor.js|ts` @@ -154,6 +148,8 @@ The language determination follows this logic: - Content language: `ignorei18n ? language.content : i18n -> language.ui` +--- + **Example of adding a new editor configuration:**
@@ -242,6 +238,8 @@ const CKEConfig = () => ({
+--- + **Example of changing buttons, modifying the plugin list, and adding styles in the default preset:**
@@ -301,15 +299,13 @@ const CKEConfig = () => ({
-> 📂 Default preset: [**admin/src/components/Input/presets/default.js**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/presets/default.js) - -> 📂 Default editor theme: [**admin/src/components/Input/theme**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/theme) - -> 💡 To display content from an external source in your admin panel, you should configure your `middlewares.js`. [**Explore the documentation for more information**](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html) +--- -## Adding plugins +> 📂 Default preset: [**admin/src/components/Input/presets/default.js**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/presets/default.js) +> +> 📂 Default theme: [**admin/src/components/Input/theme**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/theme) -___ +### Adding plugins Your plugin must be available in the `global`. @@ -441,16 +437,10 @@ const CKEConfig = () => ({ 4. Then rebuild the application: ```bash -npm run build -``` - -or -```bash yarn build ``` - -**Alternatively, you can define your plugin like this:** +**💡 Alternatively, you can define your plugin like this:**
ckeditor.js @@ -546,8 +536,9 @@ const CKEConfig = () => {
+ ## 🛠 Contributing -___ + This section explains how to set up your environment if you want to contribute to this package. @@ -590,9 +581,15 @@ yarn develop ## ✈️ Migration +### From v3 to v4 + +- The new version introduces support for Strapi v5 and is incompatible with Strapi v4. You will need to update your Strapi project to version 5 before upgrading. + +- The plugin development process has changed. Please refer to the updated contribution guide for more information. + ### From v2 to v3 -- The default editor configurations (toolbar, toolbarBalloon, blockBalloon) have been removed and now there is only one preset by default. You will need to update your fields in the Content-Type Builder +- The default editor configurations (toolbar, toolbarBalloon, blockBalloon) have been removed and now there is only one preset by default. You will need to update your fields in the Content-Type Builder. - Config file extension has changed from `.txt` to `.js` or `.ts` - Configuration object properties have been renamed: @@ -689,10 +686,16 @@ const CKEConfig = () => ({ +### From v1 to v2 +- You will need to update Strapi to version v4.4.x for plugin v2.0.x, or to v4.13.0+ for v2.1.x. + +- Starting with v2, the plugin uses the Custom Field API, so you'll need to manually update your schema. + +- The plugin configuration should be defined in /config/ckeditor.txt from v2 onward. [Please refer to the v2 configuration guide for details.](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/e782475f54b8a50a04f55275c89ef5bf61a15745/README.md?plain=1#L54) ## ⚠️ Requirements -___ + **v4.x.x**