我一直在努力为 ckeditor 添加 mathml 支持。我浏览了几个链接,但似乎没有一个起作用。我什至尝试过 ckeditor 的 WIRIS 插件,但它没有给我任何结果。对于WIRIS,我关注了this关联。有人可以告诉我如何为 ckeditor 实现 mathml 吗?
CKeditor版本:4.4.5
谢谢
最佳答案
假设您已经安装了 ckeditor,您所要做的就是以下内容:
- Download the WIRIS ckeditor plugin并将整个文件夹放入ckeditor的plugins文件夹中:
/path-to/ckeditor/plugins/ckeditor_wiris
- 在 ckeditor 标签正下方的 head 中添加 script 标签。
将其添加到 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>
关于javascript - ckeditor Mathml 插件安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27057529/