@wiris/mathtype-tinymce6 8.6.0 → 8.7.2
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.
- package/editor_plugin.src.js +14 -1
- package/package.json +2 -2
- package/plugin.min.js +1 -1
- package/plugin.min.js.map +1 -0
- package/webpack.config.js +3 -3
package/editor_plugin.src.js
CHANGED
|
@@ -136,6 +136,19 @@ export class TinyMceIntegration extends IntegrationModel {
|
|
|
136
136
|
super.updateFormula(mathml);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/** @inheritdoc */
|
|
140
|
+
insertFormula(focusElement, windowTarget, mathml, wirisProperties) {
|
|
141
|
+
// Due to insertFormula adds an image using pure JavaScript functions,
|
|
142
|
+
// it is needed notificate to the editorObject that placeholder status
|
|
143
|
+
// has to be updated.
|
|
144
|
+
const obj = super.insertFormula(focusElement, windowTarget, mathml, wirisProperties);
|
|
145
|
+
|
|
146
|
+
// Add formula to undo & redo
|
|
147
|
+
this.editorObject.undoManager.add(obj);
|
|
148
|
+
|
|
149
|
+
return obj;
|
|
150
|
+
}
|
|
151
|
+
|
|
139
152
|
/**
|
|
140
153
|
* Set Moodle configuration on plugin.
|
|
141
154
|
* @param {string} editor - Editor instance.
|
|
@@ -394,7 +407,7 @@ export const currentInstance = null;
|
|
|
394
407
|
const mathTypeIcon = 'mathtypeicon';
|
|
395
408
|
const chemTypeIcon = 'chemtypeicon';
|
|
396
409
|
const mathTypeIconSvg = '<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 300 261.7" style="enable-background:new 0 0 300 261.7;" xml:space="preserve"><g id=icon-wirisformula stroke="none" stroke-width="1" fill-rule="evenodd"><g><path class="st1" d="M90.2,257.7c-11.4,0-21.9-6.4-27-16.7l-60-119.9c-7.5-14.9-1.4-33.1,13.5-40.5c14.9-7.5,33.1-1.4,40.5,13.5l27.3,54.7L121.1,39c5.3-15.8,22.4-24.4,38.2-19.1c15.8,5.3,24.4,22.4,19.1,38.2l-59.6,179c-3.9,11.6-14.3,19.7-26.5,20.6C91.6,257.7,90.9,257.7,90.2,257.7"/></g></g><g><g><path class="st2" d="M300,32.8c0-16.4-13.4-29.7-29.9-29.7c-2.9,0-7.2,0.8-7.2,0.8c-37.9,9.1-71.3,14-112,14c-0.3,0-0.6,0-1,0c-16.5,0-29.9,13.3-29.9,29.7c0,16.4,13.4,29.7,29.9,29.7l0,0c45.3,0,83.1-5.3,125.3-15.3h0C289.3,59.5,300,47.4,300,32.8"/></g></g></svg>'; // eslint-disable-line max-len
|
|
397
|
-
const chemTypeIconSvg = '<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
410
|
+
const chemTypeIconSvg = '<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 40.3 49.5" style="enable-background:new 0 0 40.3 49.5;" xml:space="preserve"><g id=icon-wirisformula stroke="none" stroke-width="1" fill-rule="evenodd"><g><path class="st1" d="M39.2,12.1c0-1.9-1.1-3.6-2.7-4.4L24.5,0.9l0,0c-0.7-0.4-1.5-0.6-2.4-0.6c-0.9,0-1.7,0.2-2.4,0.6l0,0L2.3,10.8 l0,0C0.9,11.7,0,13.2,0,14.9h0v19.6h0c0,1.7,0.9,3.3,2.3,4.1l0,0l17.4,9.9l0,0c0.7,0.4,1.5,0.6,2.4,0.6c0.9,0,1.7-0.2,2.4-0.6l0,0 l12.2-6.9h0c1.5-0.8,2.6-2.5,2.6-4.3c0-2.7-2.2-4.9-4.9-4.9c-0.9,0-1.8,0.3-2.5,0.7l0,0l-9.7,5.6l-12.3-7V17.8l12.3-7l9.9,5.7l0,0 c0.7,0.4,1.5,0.6,2.4,0.6C37,17,39.2,14.8,39.2,12.1"/></g></g></svg>'
|
|
398
411
|
|
|
399
412
|
commonEditor.addIcon(mathTypeIcon, mathTypeIconSvg);
|
|
400
413
|
commonEditor.addIcon(chemTypeIcon, chemTypeIconSvg);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiris/mathtype-tinymce6",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.2",
|
|
4
4
|
"description": "MathType Web for TinyMCE6 editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chem",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepack": "yarn && npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@wiris/mathtype-html-integration-devkit": "1.14.
|
|
35
|
+
"@wiris/mathtype-html-integration-devkit": "1.14.2"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@babel/core": "^7.15.0",
|