如何更改 ckeditor MathJax 弹出窗口中的默认示例

How to change default example in ckeditor MathJax popup

所以我想更改 ckeditor mathjax 弹出窗口中显示的默认示例,如下所示:http://ckeditor.com/apps/ckeditor/4.4.0/samples/plugins/mathjax/mathjax.html(在编辑器中单击 mathjax 工具栏按钮)。默认示例始终为:"x = {-b \pm \sqrt{b^2-4ac} \over 2a}"

不过我想将其更改为:"\cfrac{1}{2}"

我的用户没有使用 mathjax 的经验,所以我只想让他们看到这个简单的示例,以便他们可以计算分数。 (默认示例使用“1 \over 2”而不是所需的“\cfrac{1}{2}”

我将其用作我的 mathjax 库:

    CKEDITOR.config.mathJaxLib = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML';

这可能吗?

进入ckeditor plugins文件夹并搜索插件"mathematical formulas",在后者中你会得到一个plugin.js文件。

编辑一下,默认公式在第49/50/51行。

希望对你有所帮助。