Vanessa 4 years ago
parent
commit
463fa48b83
2 changed files with 5 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 4 1
      src/ts/markdown/mathRender.ts

+ 1 - 0
CHANGELOG.md

@@ -98,6 +98,7 @@
 
 
 ### v3.8.0 / 2021-01-xx
 ### v3.8.0 / 2021-01-xx
 
 
+* [907](https://github.com/Vanessa219/vditor/issues/907) mathjax 在method.min.js 中preview 显示错误 `修复缺陷`
 * [909](https://github.com/Vanessa219/vditor/issues/909) toc 和大纲中数学公式显示问题修复 `修复缺陷`
 * [909](https://github.com/Vanessa219/vditor/issues/909) toc 和大纲中数学公式显示问题修复 `修复缺陷`
 * [908](https://github.com/Vanessa219/vditor/issues/908) 粘贴不了 MS Office Excel 内容的问题 `修复缺陷`
 * [908](https://github.com/Vanessa219/vditor/issues/908) 粘贴不了 MS Office Excel 内容的问题 `修复缺陷`
 
 

+ 4 - 1
src/ts/markdown/mathRender.ts

@@ -58,7 +58,7 @@ export const mathRender = (element: HTMLElement, options?: { cdn?: string, math?
                     });
                     });
                 } catch (e) {
                 } catch (e) {
                     mathElement.innerHTML = e.message;
                     mathElement.innerHTML = e.message;
-                    mathElement.className = "vditor-reset--error";
+                    mathElement.className = "language-math vditor-reset--error";
                 }
                 }
 
 
                 mathElement.addEventListener("copy", (event: ClipboardEvent) => {
                 mathElement.addEventListener("copy", (event: ClipboardEvent) => {
@@ -89,6 +89,9 @@ export const mathRender = (element: HTMLElement, options?: { cdn?: string, math?
                 loader: {
                 loader: {
                     paths: {mathjax: `${options.cdn}/dist/js/mathjax`},
                     paths: {mathjax: `${options.cdn}/dist/js/mathjax`},
                 },
                 },
+                startup: {
+                    typeset: false,
+                },
                 tex: {
                 tex: {
                     macros: options.math.macros,
                     macros: options.math.macros,
                 },
                 },