Skip to content

Commit 73c91bd

Browse files
carla-at-wirisncornaglia-at-wiris
authored andcommitted
fix: Update TinyMCE 7 dependency (#1082)
* feat: Create staging cleanup repo (#1080) * Staging cleanup action (#1081) * try1: fix retrieve s3 branches * try2: fix retrieve s3 branches * try3: fix retrieve s3 branches * try4: fix retrieve s3 branches * try1: compare branches * try2: compare branches * try1: Compare branches * try2: Compare branches * try1: Delete remote s3 bracnhes * try2: Delete remote s3 bracnhes * try3: Delete remote s3 bracnhes * try4: Delete remote s3 bracnhes * try5: Delete remote s3 bracnhes * feat: Create cleanup staging workflow * feat: Create cleanup staging workflow * feat: Run staging cleanup evey monday * fix: Dismantle staging workflow (#1079) * fix: Update TinyMCE 7 dependency
1 parent 159eee9 commit 73c91bd

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

demos/html/tinymce7/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@wiris/mathtype-html-integration-devkit": "*",
1515
"@wiris/mathtype-tinymce7": "*",
16-
"tinymce": "^7.0.0"
16+
"tinymce": "^7.7.0"
1717
},
1818
"devDependencies": {
1919
"copy-webpack-plugin": "^12.0.2",

demos/html/tinymce7/src/app.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ document.getElementById("version_editor").innerHTML = "TinyMCE: ";
1616
tinymce.init({
1717
selector: "#editor",
1818
license_key: "gpl",
19-
external_plugins: {
20-
tiny_mce_wiris: `${window.location.href}dist/plugin.min.js`,
21-
},
19+
external_plugins: { tiny_mce_wiris: `${window.location.href}dist/plugin.min.js` },
2220

2321
// This option allows us to introduce mathml formulas
2422
extended_valid_elements: "*[.*]",
2523
valid_elements: "*[*]",
26-
// This option disables the DOMPurify library, which is used to sanitize the content.
24+
// This option prevents the DOMPurify library from filtering wiris MathML tags.
2725
// It's necessary when you want to initialize the editor with a content that contains handwritten formulas.
28-
xss_sanitization: false,
26+
allow_mathml_annotation_encodings: ["wiris", "application/json"],
2927
// We recommend to set 'draggable_modal' to true to avoid overlapping issues
3028
// with the different UI modal dialog windows implementations between core and third-party plugins on TinyMCE.
3129
// @see: https://github.com/wiris/html-integrations/issues/134#issuecomment-905448642

packages/tinymce7/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ Easily include quality math equations in your documents and digital content.
2626
2. Add the plugin as an external plugin:
2727

2828
```js
29-
tinymce.init({
30-
external_plugins: {
31-
tiny_mce_wiris: `node_modules/@wiris/mathtype-tinymce7/plugin.min.js`,
32-
},
33-
});
29+
tinymce.init({ external_plugins: { tiny_mce_wiris: `node_modules/@wiris/mathtype-tinymce7/plugin.min.js` } });
3430
```
3531

3632
3. Add MathType buttons to the TinyMCE7 toolbar and the recommended settings:
@@ -47,6 +43,9 @@ Easily include quality math equations in your documents and digital content.
4743
// Not enabling this, will provide formulas from being created and rendered.
4844
extended_valid_elements: "*[.*]",
4945
valid_elements: "*[*]",
46+
// This option prevents the DOMPurify library from filtering wiris MathML tags.
47+
// It's necessary when you want to initialize the editor with a content that contains handwritten formulas.
48+
allow_mathml_annotation_encodings: ["wiris", "application/json"],
5049

5150
// You could set a different language for MathType editor:
5251
// language: 'fr_FR',

0 commit comments

Comments
 (0)