我在 ckeditor 的插件文件夹中添加了 mathjax 插件。但是,在将这些特定行指定为现有脚本后,即使编辑器也没有显示。你能帮我解决这个问题吗? 在添加 mathjax 插件之前输出是这样的。[在此处输入图像描述][1] 添加mathjax插件后输出如下[enter image description here][2]
<textarea id="editor1" name="editor1" maxlength="50"></textarea>
<script type="text/javascript">
CKEDITOR.replace( 'editor1', {
extraPlugins: 'mathjax',
mathJaxLib: 'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS_HTML'
} );
</script>
[1]: /image/SgDfU.png
[2]: /image/dJoqH.png
最佳答案
您还需要下载并安装插件。 https://ckeditor.com/cke4/addon/mathjax
下载 -> 解压到 ckeditor/plugins/即可。
还要记住,多个插件必须像这样用逗号分隔: extraPlugins = 'mathjax, plugin1, plugin2, etc' ,否则它也不会工作。
关于javascript - 如何将mathjax插件添加到ckeditor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40654466/