我一直在努力为 ckeditor 添加 mathml 支持。我已经浏览了几个链接,但似乎没有一个有效。我什至尝试过用于 ckeditor 的 WIRIS 插件,但它没有给我任何结果。对于WIRIS,我已经点击了这个链接。有人可以告诉我如何为 ckeditor 实现数学。
CK编辑器版本:4.4.5
谢谢
假设您已经准备好了 ckeditor,您所要做的就是:
- 下载 WIRIS ckeditor 插件,并将整个文件夹放入 ckeditor 的插件文件夹中:
/path-to/ckeditor/plugins/ckeditor_wiris
- 在 ckeditor 标签正下方的头部中添加脚本标签。
-
将此添加到 ckeditor 的配置属性中:
extraPlugins:'ckeditor_wiris' allowedContent: true
显然,您必须将"path-to"替换为您自己的 ckeditor 所在路径。它应该看起来像这样:
<!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>
有人可以告诉我如何为 ckeditor 实现数学?
为什么不让 MathML 实现用于网络浏览器(Firefox 支持 MathML 和 WebKit 也可以,Google 只需要在 Chrome 中启用它)。
如果通过"实现",你的意思是避免CKEdiditor在尝试包含它时删除它当我写 http://ckeditor.com/addon/texzilla 时,我遇到了这个问题。插件的源代码可以在 https://github.com/r-gaia-cs/CKEditor-TeXZilla 找到(希望这能帮助你找到解决问题的方法)。