File tree 3 files changed +8
-11
lines changed
3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 13
13
"dependencies" : {
14
14
"@wiris/mathtype-html-integration-devkit" : " *" ,
15
15
"@wiris/mathtype-tinymce7" : " *" ,
16
- "tinymce" : " ^7.0 .0"
16
+ "tinymce" : " ^7.7 .0"
17
17
},
18
18
"devDependencies" : {
19
19
"copy-webpack-plugin" : " ^12.0.2" ,
Original file line number Diff line number Diff line change @@ -16,16 +16,14 @@ document.getElementById("version_editor").innerHTML = "TinyMCE: ";
16
16
tinymce . init ( {
17
17
selector : "#editor" ,
18
18
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` } ,
22
20
23
21
// This option allows us to introduce mathml formulas
24
22
extended_valid_elements : "*[.*]" ,
25
23
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 .
27
25
// 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" ] ,
29
27
// We recommend to set 'draggable_modal' to true to avoid overlapping issues
30
28
// with the different UI modal dialog windows implementations between core and third-party plugins on TinyMCE.
31
29
// @see : https://github.com/wiris/html-integrations/issues/134#issuecomment-905448642
Original file line number Diff line number Diff line change @@ -26,11 +26,7 @@ Easily include quality math equations in your documents and digital content.
26
26
2 . Add the plugin as an external plugin:
27
27
28
28
``` 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` } });
34
30
```
35
31
36
32
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.
47
43
// Not enabling this, will provide formulas from being created and rendered.
48
44
extended_valid_elements: " *[.*]" ,
49
45
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" ],
50
49
51
50
// You could set a different language for MathType editor:
52
51
// language: 'fr_FR',
You can’t perform that action at this time.
0 commit comments