Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nshenderov committed Sep 26, 2024
1 parent 8980684 commit 86c4476
Showing 1 changed file with 35 additions and 32 deletions.
67 changes: 35 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,21 @@


## <a id="installation"></a>🔧 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
```
Expand All @@ -77,9 +69,11 @@ yarn build
</details>

## <a id="configuration"></a>⚙️ 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`

Expand Down Expand Up @@ -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:**

<details>
Expand Down Expand Up @@ -242,6 +238,8 @@ const CKEConfig = () => ({

</details>

---

**Example of changing buttons, modifying the plugin list, and adding styles in the default preset:**

<details>
Expand Down Expand Up @@ -301,15 +299,13 @@ const CKEConfig = () => ({

</details>

> 📂 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`.

Expand Down Expand Up @@ -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:**

<details>
<summary><b>ckeditor.js</b></summary>
Expand Down Expand Up @@ -546,8 +536,9 @@ const CKEConfig = () => {
</details>
## <a id="contributing"></a>🛠 Contributing
___
This section explains how to set up your environment if you want to contribute to this package.
Expand Down Expand Up @@ -590,9 +581,15 @@ yarn develop
## <a id="migration"></a>✈️ 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:
Expand Down Expand Up @@ -689,10 +686,16 @@ const CKEConfig = () => ({
</details>
### 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)
## <a id="requirements"></a>⚠️ Requirements
___
**v4.x.x**
Expand Down

0 comments on commit 86c4476

Please sign in to comment.