You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was working on the all-features sample, I wanted to add Math plugin to the editor. My all branches were checked out on changes related to #6091 and unfortunately, Math plugin crashed.
It threw an error:
I went through their sources and what I can notice:
@wiris/ckeditor5-math/src/conversion/mathmldataprocessor.js, it extends our XmlDataProcessor which changed its API. The following fix should help:
exportdefaultclassMathmlDataProcessorextendsXmlDataProcessor{/** * Creates a new instance of the MathML data processor class. * * @param {module:engine/view/document~Document} document * @param {Object} options Configuration options. * @param {Array<String>} [options.namespaces=[]] A list of namespaces allowed to use in the XML input. */constructor(document,options={}){// Call XmlDataProcessor's constructorsuper(document,options);// Use BR_FILLER instead of NSBP_FILLER to identify <br/> and remove them when retrieving datathis._domConverter=newDomConverter(document,{blockFiller: BR_FILLER});}
@wiris/mathtype-ckeditor5/src/conversion/downcast.js - L31 creates an instance of HtmlDataProcessor. This class requires an instance of view.Document now. It could be taken from conversionApi:
In this issue – #6091 – we change our API. All breaking changes are described in the PR – ckeditor/ckeditor5-engine#1826 (comment).
When I was working on the all-features sample, I wanted to add Math plugin to the editor. My all branches were checked out on changes related to #6091 and unfortunately, Math plugin crashed.
It threw an error:
![image](https://user-images.githubusercontent.com/2270764/75659805-de0e7680-5c6a-11ea-8add-81141aeba7ce.png)
I went through their sources and what I can notice:
@wiris/ckeditor5-math/src/conversion/mathmldataprocessor.js
, it extends ourXmlDataProcessor
which changed its API. The following fix should help:@wiris/mathtype-ckeditor5/src/conversion/downcast.js
- L31 creates an instance ofHtmlDataProcessor
. This class requires an instance ofview.Document
now. It could be taken fromconversionApi
:In the same file as above, L32 (
CustomMathmlDataProcessor
) – the same fix.@wiris/mathtype-ckeditor5/src/plugin.js
- L176 - missing the view document:@wiris/mathtype-ckeditor5/src/integration.js
– L144, as above:I am not sure I found everything thought.
The text was updated successfully, but these errors were encountered: