-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Wiris MathType plugin is not working with ckeditor5 in React/Vue #2048
Comments
Hello, thank you for the report. I'm able to reproduce this issue - adding MathType plugin to the editor built from source with React triggers the error. It looks like some changes in Webpack config are required. Steps to reproduce:
We're in touch with Wiris about this issue. |
any alternative for the time being? |
This issue occurs also with vue too, see #2057. |
Here's how I do it chainWebpack: config => {
svgRule.exclude.add(path.join(__dirname, 'node_modules', '@ckeditor'))
svgRule.exclude.add(path.join(__dirname, 'node_modules', '@wiris'))
config.module
.rule('cke-svg')
.test(/theme[/\\]icons[/\\][^/\\]+\.svg$/)
.use('raw-loader')
.loader('raw-loader')
config.module
.rule('cke-css')
.test(/ckeditor5-[^/\\]+[/\\].+\.css$/)
.use('postcss-loader')
.loader('postcss-loader')
.tap(() => { That's not all。Because mathtype does not match the current filtering rules, the icon cannot be found。 |
@duzhihao-github thanks a lot man, you saved my day! I confirm that adding this line svgRule.exclude.add(path.join(__dirname, 'node_modules', '@wiris')) and by updating the config.module
.rule('cke-svg')
.test(/theme[/\\]icons[/\\][^/\\]+\.svg$/)
.use('raw-loader')
.loader('raw-loader') |
@mstermaaten |
This is my first time i had to go add & change stuff in my webpack.config so i find it difficult to find where to add all these additional configs... |
Add two new elements to the exported object under the module.rules array (as new items of the oneOf array). These are SVG and CSS loaders required to handle the CKEditor 5 source: Note the change: test: /theme[/\]icons[/\][^/\\]+.svg$/, This works in React!!! (Mathtype and Chemtype) . Hope this helps! Thanks! |
@mlewand did the recent changes with icons solve this issue? |
I've actually fixed this problem by:
|
Hm... That makes sense. The problem comes from the fact that MathType comes in I'll talk with guys from Wiris, maybe they'll be fine with renaming their package to follow the convention. |
@mstermaaten Hello, I clone your app fixed this issues but I still error when run project. Can you support me fix it? Thank you!!! |
Hey everyone, any news about this issue? @tuannd255 |
@tuannd255 I fixed this error making the file loader from the CRA config ignore icons from ckeditor plugins, something like: svgRule.exclude.add(/theme[/\]icons[/\][^/\]+.svg$/) Adding this line to your CRA config the file loader will ignore icons from any plugin that you are using with ckeditor. |
@Reinmar what do you think to add to the official docs a section to help people with similar problems with loaders and config for custom builds? |
Frankly this thread saved my day.!! Awesome |
Hi all! This issue will be resolved with #8114. We want to change the default regexp that we're proposing to cover packages that are named |
Bug report
@ckeditor/ckeditor5-react: v1.1.3,
@wiris/mathtype-ckeditor5: v7.16.1,
....
I simply try to implement the MathType plugin following this documentation:
I'm getting an error and this only happens when i try to implement the MathType plugin. I'm not sure if i'm missing any config settings that i have to parse to
initialize the plugin but reading trough the documentation i'm not seeing anything i'm missing. Maybe I have to buy a licence or something??
📋 Steps to reproduce
✅ Expected result
The text was updated successfully, but these errors were encountered: