Open mibs-pal opened 2 months ago
Hello @mibs-pal, thank you for writing us!
Your proposal seems possible. The team will conduct an investigation and let you know what the final solution is once it's released. Any further issues, please feel free to contact us or write an email to our support team at support@wiris.com.
Description
Previously it was possible to customize
CKEditor5Integration
since you could do something likeThis is not possible anymore with your new installation method (
import MathType from '@wiris/mathtype-ckeditor5/dist/index.js';
) becauseCKEditor5Integration
(and other classes that are exported in the old installation method, but not in the new one) are not exported from that file.And combining it with old installation methods doesn't work either, likely because of many reasons, one being that MathTypeCommand throws an error if
CKEditor5Integration
if the integration extends another class which it is, since the class in the dist version is not the same as the source versionEnvironment
Using
on
Google Chrome
,Version 128.0.6613.120 (Official Build) (arm64)
,MacOS 14.5
Steps to reproduce
Use the example above. In
_addIntegration
you can add the same code as in the original function but replaceintegration = new CKEditor5Integration(integrationProperties);
withMyIntegration
Expected result
You should be able to use MathType and see
Custom insertMathml here
in the console when insertingActual result
Error in the console:
'Must pass a valid CKEditor5Integration instance as attribute "integration" of options'
Other details
Something like this will likely solve the issue?
in https://github.com/wiris/html-integrations/blob/4bc9bffd9a87ae2560621777f23e97994027d153/packages/ckeditor5/src/index.js