@wiris/mathtype-ckeditor5 8.13.2 → 8.13.4
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/dist/browser/index.js +32 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.js +31 -2
- package/dist/browser/index.umd.js.map +1 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/plugin.js +67 -44
|
@@ -11420,7 +11420,7 @@
|
|
|
11420
11420
|
|
|
11421
11421
|
var chemIcon = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 40.3 49.5\" style=\"enable-background:new 0 0 40.3 49.5;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.st0{fill:#A4CF61;}\n</style>\n<path class=\"st0\" 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\n\tl0,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\n\tl12.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\n\tc0.7,0.4,1.5,0.6,2.4,0.6C37,17,39.2,14.8,39.2,12.1\"/>\n</svg>\n";
|
|
11422
11422
|
|
|
11423
|
-
var version = "8.13.
|
|
11423
|
+
var version = "8.13.4";
|
|
11424
11424
|
var packageInfo = {
|
|
11425
11425
|
version: version};
|
|
11426
11426
|
|
|
@@ -11603,7 +11603,7 @@
|
|
|
11603
11603
|
const processor = new ckeditor5.XmlDataProcessor(editor.editing.view.document);
|
|
11604
11604
|
// Only god knows why the following line makes viewItem lose all of its children,
|
|
11605
11605
|
// so we obtain isLatex before doing this because we need viewItem's children for that.
|
|
11606
|
-
const upcastWriter = new ckeditor5.
|
|
11606
|
+
const upcastWriter = new ckeditor5.ViewUpcastWriter(editor.editing.view.document);
|
|
11607
11607
|
const viewDocumentFragment = upcastWriter.createDocumentFragment(viewItem.getChildren());
|
|
11608
11608
|
// and obtain the attributes of <math> too!
|
|
11609
11609
|
const mathAttributes = [
|
|
@@ -11657,6 +11657,32 @@
|
|
|
11657
11657
|
if (viewItem.getClassNames().next().value !== "Wirisformula") {
|
|
11658
11658
|
return;
|
|
11659
11659
|
}
|
|
11660
|
+
// The following code ensures that the element's name, attributes, and classes are consumed.
|
|
11661
|
+
// This means that they are marked as handled so that other parts of the system or plugins don't process them again.
|
|
11662
|
+
// Check if we can consume the element name.
|
|
11663
|
+
if (!consumable.test(viewItem, {
|
|
11664
|
+
name: true
|
|
11665
|
+
})) {
|
|
11666
|
+
return;
|
|
11667
|
+
}
|
|
11668
|
+
// Consume the name, attributes, and classes so nothing else processes it.
|
|
11669
|
+
consumable.consume(viewItem, {
|
|
11670
|
+
name: true
|
|
11671
|
+
});
|
|
11672
|
+
for (const attrName of viewItem.getAttributes()){
|
|
11673
|
+
consumable.consume(viewItem, {
|
|
11674
|
+
attributes: [
|
|
11675
|
+
attrName
|
|
11676
|
+
]
|
|
11677
|
+
});
|
|
11678
|
+
}
|
|
11679
|
+
for (const className of viewItem.getClassNames()){
|
|
11680
|
+
consumable.consume(viewItem, {
|
|
11681
|
+
classes: [
|
|
11682
|
+
className
|
|
11683
|
+
]
|
|
11684
|
+
});
|
|
11685
|
+
}
|
|
11660
11686
|
const mathAttributes = [
|
|
11661
11687
|
...viewItem.getAttributes()
|
|
11662
11688
|
].map(([key, value])=>` ${key}="${value}"`).join("");
|
|
@@ -11692,6 +11718,9 @@
|
|
|
11692
11718
|
// Otherwise just continue after inserted element.
|
|
11693
11719
|
data.modelCursor = data.modelRange.end;
|
|
11694
11720
|
}
|
|
11721
|
+
}, // Ensures MathType processes the Wiris formulas before other plugins, preventing conflicts.
|
|
11722
|
+
{
|
|
11723
|
+
priority: "high"
|
|
11695
11724
|
});
|
|
11696
11725
|
/**
|
|
11697
11726
|
* Whether the given view <math> element has a LaTeX annotation element.
|