我在ckeditor
内置的html页面中努力使用angularjs
。
我尝试了很多例子。
ng-ckeditor directive
ckeditor directive
但这些例子都没有帮助我。
我想要一个textarea,我可以在其中输入图像并编辑其内容样式(如ckeditor
中所示)。
任何人都可以给我一个明确的示例或演示小提示,了解如何在ckeditor
中使用angularjs
。
我也尝试过自定义指令。它没有用。
ck编辑器还有其他选择吗?
提前致谢。
答案 0 :(得分:1)
https://github.com/lemonde/angular-ckeditor。实际上,在README.md中记录了步骤1-3,其余的很容易开发......
在你的html中链接你的js文件,保持 跟踪订单:
如上所述,使用您的控制器和html中的指令。如果您想使用html中的数据预先初始化编辑器,可以使用以下内容:
data-ng-init="content='this is a text with <a href="http://localhost/whatever.html" target="_blank">an embedded Link</a>'" contenteditable="true" ready="onReady()">
或者在控制器中初始化模型变量(硬编码或通过$ http)。
我从How to use ckeditor in angular JS app?得到了这个。它对我有用。