-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prioritize reading files from config/env/envName/ckeditor.js|ts first #172
Comments
Thanks, but it wasn't working in the Typescript Strapi project using the latest version of the plugin. Generated js file is as follows:
The plugin doesn't load even on localhost and we get Uncaught ReferenceError: exports is not defined on line in the file generated from Typescript. Tsconfig.json is as follows:
moduleDetection is needed because of the different environments, and CommonJS and ES2019 are needed by Strapi, you cannot go back to es2015 because Strapi would fail to load. |
@cslegany-synerinsoft I see the issue. I didn't test it with "moduleDetection": "force". Since the content of ckeditor.js is pasted into the script tag, the line added by TS |
Is your feature request related to a problem? Please describe.
A custom configuration is needed by us to remove h1 and h2 options and keep just the rest. Here is the content of config/ ckeditor.ts which ovverrides the default preset.
const CKEConfig = () => ({ presets: { default: { editorConfig: { heading: { options: [ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' }, { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3', }, { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4', }, { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5', }, { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6', }, ], }, } } }, });
We have different environments like production, staging etc. Currently the strapi ckeditor plugin doesn't support priorized reading from config/env/envName/ckeditor.js|ts first. As a result it seems to me that the plugin cannot load the config file on our environments.
Describe the solution you'd like
Priorized reading from config/env/envName/ckeditor.js|ts first.
The text was updated successfully, but these errors were encountered: