How to use config.ts #171
-
I have a Typescript project and would like to use a custom configuration to remove h1 and h2 options and keep just the rest. Here is the content of config/ ckeditor.ts which ovverrides the default preset.
We have different environments like production, staging etc. So I've added the same ckeditor.ts file into configuration/env/production, configuration/etc/staging etc. In order to get a working deployment, the ckeditor file has to be ts and not js so that it gets copied into the dist folder. Everything works fine on the local environment: h1 and h2 gets hidden. However it doesn't hide h1 and h2 on our production and staging environments, all h1, h2, ... h6 options get displayed. It seems to me that the plugin cannot load the config file. Any ideas how to get this working? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@cslegany-synerinsoft The current logic for reading the config file only supports the |
Beta Was this translation helpful? Give feedback.
@cslegany-synerinsoft The current logic for reading the config file only supports the
config/ckeditor.js|ts
path. I'm not sure how essential multiple environment configurations are for ckeditor, but I see the issue. It would be better to follow Strapi's logic and prioritize reading files fromconfig/env/envName/ckeditor.js|ts
first. Feel free to open an issue, I'll fix it soon.