I have installed three packages:
- @ckeditor/ckeditor5-react
- @ckeditor/ckeditor5-build-classic
- @wiris/mathtype-ckeditor5/src/plugin
I'm able to setup simple ckeditor5 but don't know how to use MathType plugin in this editor.
Here is my sample code:
<CKEditor
data={input.value}
editor={ClassicEditor}
onChange={(event, editor) => {
return input.onChange(editor.getData());
}}
/>;
Can anyone explain how i can use this? Thanks.
Here's a link you should see to understand how to add a plugin to ckeditor.
TL;DR: You should create a new build containing your plugin (in your case MathType plugin), the easiest way to do it is using their online builder, then you can use that build that you generated instead of
@ckeditor/ckeditor5-build-classicfor example.I have already done this work and published it to npm, you can install it with:
npm install ckeditor5-classic-with-mathtypeHere's an example of using it with react: