nshenderov / strapi-plugin-ckeditor

Integrates CKEditor 5 into your Strapi project as a fully customizable custom field.
https://www.npmjs.com/package/@_sh/strapi-plugin-ckeditor
MIT License
103 stars 58 forks source link

Custom preset causes custom field to not show and existing field to show error #168

Closed enijar closed 1 month ago

enijar commented 1 month ago

Describe the bug I've added a custom preset as per the documentation inside the file config/ckeditor.ts:

export default {
  presets: {
    custom: {
      editorConfig: {
        toolbar: {
          items: ["heading", "|", "bold", "italic", "strikethrough", "link"],
        },
      },
    },
  },
};

When I run the build and start the development server, I see two issues:

  1. When attempting to add a CKEditor field to an existing collection it doesn't show in the custom tab Screenshot 2024-10-10 at 14 58 43

  2. The existing CKEditor field I have on one of my collection shows a blank, disabled input Screenshot 2024-10-10 at 14 59 45

To Reproduce Outlined above

Expected behavior I should see the CKEditor custom field with the preset "custom" as defined in my config.

please complete the following information: config/plugins.ts export default () => ({});

package.json

{
  "private": true,
  "scripts": {
    "build": "strapi build",
    "deploy": "strapi deploy",
    "develop": "strapi develop",
    "start": "strapi start",
    "strapi": "strapi"
  },
  "dependencies": {
    "@_sh/strapi-plugin-ckeditor": "4.0.6",
    "@strapi/email": "5.0.4",
    "@strapi/plugin-cloud": "5.0.4",
    "@strapi/plugin-color-picker": "5.0.4",
    "@strapi/plugin-users-permissions": "5.0.4",
    "@strapi/strapi": "5.0.4",
    "mysql2": "3.11.3",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-router-dom": "6.26.2",
    "sanitize-html": "2.13.1",
    "styled-components": "6.1.13",
    "zod": "3.23.8"
  },
  "devDependencies": {
    "@types/node": "22",
    "@types/react": "18",
    "@types/react-dom": "18",
    "@types/sanitize-html": "2.13.0",
    "typescript": "5"
  },
  "engines": {
    "node": ">=18.0.0 <=20.x.x",
    "npm": ">=6.0.0"
  },
  "strapi": {
    "uuid": "b1e9e956-72b1-45b2-9cf5-382fd4002568"
  }
}

node version v20.16.0

nshenderov commented 1 month ago

Your configuration is wrong. Follow this example: https://github.com/nshenderov/strapi-plugin-ckeditor/blob/9cecf62a13a78a890de680db980aaf47c1d5a674/README.md?plain=1#L159-L236

nshenderov commented 1 month ago

Looks like this issue is no longer relevant