@wiris/mathtype-tinymce7 8.13.4 → 8.14.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.
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # MathType for TinyMCE V7
1
+ # MathType for TinyMCE V7 and V8
2
+ > **Warning:** This package works for TinyMCE v7 and v8.
2
3
 
3
4
  Type and handwrite mathematical notation with MathType.
4
5
 
@@ -20,7 +21,9 @@ Easily include quality math equations in your documents and digital content.
20
21
  npm install @wiris/mathtype-tinymce7
21
22
  ```
22
23
 
23
- > MathType is fully compatible with TinyMCE 7 from version 7.8.0.
24
+ > This module is fully compatible with:
25
+ > - TinyMCE 7 from version 7.8.0
26
+ > - TinyMCE 8
24
27
 
25
28
  2. Add the plugin as an external plugin:
26
29
 
@@ -28,7 +31,7 @@ Easily include quality math equations in your documents and digital content.
28
31
  tinymce.init({ external_plugins: { tiny_mce_wiris: `node_modules/@wiris/mathtype-tinymce7/plugin.min.js` } });
29
32
  ```
30
33
 
31
- 3. Add MathType buttons to the TinyMCE7 toolbar and the recommended settings:
34
+ 3. Add MathType buttons to the TinyMCE toolbar and the recommended settings:
32
35
 
33
36
  ```js
34
37
  tinymce.init({
@@ -68,8 +71,6 @@ Easily include quality math equations in your documents and digital content.
68
71
  });
69
72
  ```
70
73
 
71
- - The editor's caret is lost when inserting a new formula on Safari with ChemType [#486](https://github.com/wiris/html-integrations/issues/486)
72
-
73
74
  ## Services
74
75
 
75
76
  This npm module uses remotely hosted services to render MathML data. However, we recommend you install these services on your backend. This will allow you, among other things, to configure the service and to locally store the images generated by MathType.
@@ -109,8 +109,8 @@ export class TinyMceIntegration extends IntegrationModel {
109
109
  // When a formula is updated TinyMCE 'Change' event must be fired.
110
110
  // See https://www.tiny.cloud/docs/advanced/events/#change for further information.
111
111
  const listener = Listeners.newListener("onAfterFormulaInsertion", () => {
112
- if (typeof this.editorObject.fire !== "undefined") {
113
- this.editorObject.fire("Change");
112
+ if (typeof this.editorObject.dispatch !== "undefined") {
113
+ this.editorObject.dispatch("Change");
114
114
  }
115
115
  });
116
116
  this.getCore().addListener(listener);
@@ -135,8 +135,8 @@ export class TinyMceIntegration extends IntegrationModel {
135
135
  * @param {string} mathml - MathML to generate the formula and can be caught with the event.
136
136
  */
137
137
  updateFormula(mathml) {
138
- if (typeof this.editorObject.fire !== "undefined") {
139
- this.editorObject.fire("ExecCommand", {
138
+ if (typeof this.editorObject.dispatch !== "undefined") {
139
+ this.editorObject.dispatch("ExecCommand", {
140
140
  command: "updateFormula",
141
141
  value: mathml,
142
142
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiris/mathtype-tinymce7",
3
- "version": "8.13.4",
3
+ "version": "8.14.0",
4
4
  "description": "MathType Web for TinyMCE7 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.17.11"
35
+ "@wiris/mathtype-html-integration-devkit": "1.17.12"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/core": "^7.24.4",