【发布时间】:2017-03-05 03:43:02
【问题描述】:
我正在尝试使用以下角度 ckeditor 扩展 -
https://github.com/lemonde/angular-ckeditor
更新: 已经在应用模块中注入了 'ckeditor'
我将以下指令插入到我的部分 html -
<div ckeditor="data_options" ng-model="note.note_data" ready="onReady()"></div>
并向控制器添加以下配置选项 -
$scope.data_options = {
lang: 'en',
allowedContent: true,
entities: false,
extraPlugins: ['mathjax'],
mathJaxClass: 'm-equation',
mathJaxLib: 'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS_HTML'
};
但我在浏览器中收到以下错误 -
Uncaught TypeError: d.replace is not a functionA @ ckeditor.js:249(anonymous function) @ ckeditor.js:248(anonymous function) @ ckeditor.js:475(anonymous function) @ ckeditor.js:236e @ ckeditor.js:231A @ ckeditor.js:231r @ ckeditor.js:231(anonymous function) @ ckeditor.js:232
我是否犯了任何其他错误,或者这可能是一个错误或什么? 是否有任何替代方法来获得支持 mathjax(tex/latex) 的 Angular wysiwyg 编辑器
【问题讨论】:
-
您是否将“ckeditor”注入到模块依赖项中?
-
是的。它可以在没有额外插件、mathjaxlib、类配置选项的情况下工作
-
未来注意事项:cdn.mathjax.org 即将结束生命周期,请查看mathjax.org/cdn-shutting-down 了解迁移提示。
-
未来注意事项:cdn.mathjax.org 即将结束生命周期,请查看mathjax.org/cdn-shutting-down 了解迁移提示。
标签: javascript angularjs ckeditor wysiwyg mathjax