我在我的项目中使用 CK 编辑器,现在我想应用额外的插件来在 CK 编辑器中添加数学公式。
我尝试了 CK 编辑器数学公式文档,但完全不清楚该怎么做。 http://sdk.ckeditor.com/samples/mathjax.html
http://docs.ckeditor.com/#!/guide/dev_mathjax
我的 config.js 文件如下所示
CKEDITOR.editorConfig = function( config ) {
config.extraPlugins = 'mathjax';
config.mathJaxClass = 'equation';
config.mathJaxLib = 'http://cdn.mathjax.org/mathjax/2.2-latest/MathJax.js?config=TeX-AMS_HTML';
}
此代码不起作用。
我错过了一些事情或者我以错误的方式做这件事?
请帮帮我。
最佳答案
是的,我找到了解决方案。
我替换了当前的 gem
https://github.com/galetahub/ckeditor
至
https://github.com/matismasters/ckeditor_mathml
现在一切正常了。
关于javascript - CK 编辑器支持 Rails 4 中的数学公式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31238257/