suneditor 2.43.2 → 2.43.3
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/package.json
CHANGED
package/src/lib/core.js
CHANGED
|
@@ -23,8 +23,7 @@ export default {
|
|
|
23
23
|
context.math.focusElement = math_dialog.querySelector('.se-math-exp');
|
|
24
24
|
context.math.previewElement = math_dialog.querySelector('.se-math-preview');
|
|
25
25
|
context.math.fontSizeElement = math_dialog.querySelector('.se-math-size');
|
|
26
|
-
context.math.focusElement.addEventListener('
|
|
27
|
-
context.math.focusElement.addEventListener('change', this._renderMathExp.bind(core, context.math), false);
|
|
26
|
+
context.math.focusElement.addEventListener(core.util.isIE ? 'textinput' : 'input', this._renderMathExp.bind(core, context.math), false);
|
|
28
27
|
context.math.fontSizeElement.addEventListener('change', function (e) { this.fontSize = e.target.value; }.bind(context.math.previewElement.style), false);
|
|
29
28
|
|
|
30
29
|
/** math controller */
|
|
@@ -140,7 +139,7 @@ export default {
|
|
|
140
139
|
|
|
141
140
|
_renderer: function (exp) {
|
|
142
141
|
const katex = this.options.katex;
|
|
143
|
-
return katex.src.renderToString(exp,
|
|
142
|
+
return katex.src.renderToString(exp, {throwOnError: true, displayMode: true});
|
|
144
143
|
},
|
|
145
144
|
|
|
146
145
|
_renderMathExp: function (contextMath, e) {
|
|
@@ -817,7 +817,7 @@ export default {
|
|
|
817
817
|
|
|
818
818
|
if (!onlyH) w = this.util.getNumber(w, 0);
|
|
819
819
|
if (!onlyW) h = this.util.isNumber(h) ? h + contextVideo.sizeUnit : !h ? '' : h;
|
|
820
|
-
w ? w + contextVideo.sizeUnit : '';
|
|
820
|
+
w = w ? w + contextVideo.sizeUnit : '';
|
|
821
821
|
|
|
822
822
|
if (!onlyH) contextVideo._element.style.width = w;
|
|
823
823
|
if (!onlyW) contextVideo._cover.style.paddingBottom = contextVideo._cover.style.height = h;
|