ckeditor Mathml插件安装

时间:2014-11-21 09:01:30

标签: javascript php phpmyadmin ckeditor mathml

我一直在努力为ckeditor添加mathml支持。我已经通过几个链接,但似乎没有工作。我甚至为ckeditor尝试了WIRIS插件,但它没有给我任何结果。对于WIRIS,我已经关注this链接。有人可以告诉我如何为ckeditor实现mathml。

CKeditor版本: 4.4.5

谢谢,

2 个答案:

答案 0 :(得分:2)

假设你有ckeditor,你需要做的就是以下几点:

  1. Download the WIRIS ckeditor plugin并将整个文件夹放在ckeditor的插件文件夹中:
    /path-to/ckeditor/plugins/ckeditor_wiris
  2. 在ckeditor标记下方的头部添加脚本标记。
  3. 将此添加到ckeditor的配置属性:

    extraPlugins:'ckeditor_wiris'
    allowedContent: true
    
  4. 显然你必须用你自己的ckeditor所在的路径替换'path-to'。 看起来应该是这样的:

    <!DOCTYPE html>
    <html>
        <head>
            <title></title>
            <meta charset="utf-8">
            <script src="path-to/ckeditor/ckeditor.js"></script>
            <script src="path-to/ckeditor/plugins/ckeditor_wiris/plugin.js"></script>
        </head>
        <body>
            <form>
                <textarea name="editor1" id="editor1" rows="10" cols="80">
                    This is my textarea to be replaced with CKEditor.
                </textarea>
                <script>
                    CKEDITOR.replace( 'editor1', {
                        extraPlugins:'ckeditor_wiris',
                        allowedContent: true
                    });
    
                </script>
            </form> 
        </body>
    </html>
    

答案 1 :(得分:0)

  

有人可以告诉我如何为ckeditor实现mathml?

为什么不让Web浏览器的MathML实现(Firefox支持MathML和WebKit,Google必须在Chrome中启用它)。

如果通过“实现”,则表示当您尝试包含它时,请避免CKEditor将其删除 我写http://ckeditor.com/addon/texzilla时遇到了这个问题。该插件的源代码可以在https://github.com/r-gaia-cs/CKEditor-TeXZilla找到(希望这有助于您找到解决问题的方法)。