@wiris/mathtype-ckeditor5 8.3.1 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/plugin.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiris/mathtype-ckeditor5",
3
- "version": "8.3.1",
3
+ "version": "8.4.0",
4
4
  "description": "MathType Web for CKEditor5 editor",
5
5
  "keywords": [
6
6
  "chem",
@@ -39,6 +39,6 @@
39
39
  "@ckeditor/ckeditor5-engine": ">=23.0.0",
40
40
  "@ckeditor/ckeditor5-ui": ">=23.0.0",
41
41
  "@ckeditor/ckeditor5-widget": ">=23.0.0",
42
- "@wiris/mathtype-html-integration-devkit": "1.12.1"
42
+ "@wiris/mathtype-html-integration-devkit": "1.12.2"
43
43
  }
44
44
  }
package/src/plugin.js CHANGED
@@ -337,7 +337,7 @@ export default class MathType extends Plugin {
337
337
  function createViewImage(modelItem, { writer: viewWriter }) {
338
338
  const htmlDataProcessor = new HtmlDataProcessor(viewWriter.document);
339
339
 
340
- const mathString = modelItem.getAttribute('formula');
340
+ const mathString = modelItem.getAttribute('formula').replace('ref="<"', 'ref="&lt;"');
341
341
  const imgHtml = Parser.initParse(mathString, editor.config.get('language'));
342
342
  const imgElement = htmlDataProcessor.toView(imgHtml).getChild(0);
343
343
 
@@ -410,8 +410,8 @@ export default class MathType extends Plugin {
410
410
  * Hack to transform $$latex$$ into <math> in editor.getData()'s output.
411
411
  */
412
412
  editor.data.get = (options) => {
413
- const output = get.bind(editor.data)(options);
414
- return Parser.endParse(MathML.mathMLEntities(output));
413
+ let output = get.bind(editor.data)(options);
414
+ return Parser.endParse(output);
415
415
  };
416
416
  }
417
417