-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Adding a math plugin results in duplicate CKEditor error. #185
Comments
You encounter this error because this plugin uses a legacy import method |
Have you added it to the global object? import MathType from '@wiris/mathtype-ckeditor5/dist/browser/index.js';
globalThis.MathType = MathType; |
No, I think it is added to the globalThis just by importing (that's how I saw it being done in examples)
|
I thought all I need to do is import it and pass it in plugins: [] |
app.tsx import MathType from '@wiris/mathtype-ckeditor5/dist/browser/index.js';
globalThis.MathType = MathType; ckeditor.ts plugins: [
globalThis.Mathematics,
...
],
toolbar: [
'MathType',
'ChemType',
...
] p.s. I didn't deal with security policies, but they need to be set in order to use the plugin |
I added the correct security config. The plugin loads, the css is bugged (the popup is hidden behind sidebar etc). I think I can just handle that with some css. I still get this error though |
These errors aren’t related to this repository. It would be better to report them to the maintainers of the plugin. |
Okay, I will, thanks Can you confirm that it also doesn't work for you? |
There is a comment in the related issue mentioning similar behavior, I just checked that plugin loads and that's it. |
Okay thanks |
// app.tsx
import '@wiris/mathtype-ckeditor5';
// ckeditor.ts
plugins: [
globalThis.Mathematics,
...
I know there are similar issues on github, I tried the advice but I still can't make it work.
I have tried this plugin, and ckeditor5-math
The text was updated successfully, but these errors were encountered: