Ste*_*ack 4 javascript ckeditor
我在我的网络应用程序中使用 CKEditor,但我不知道如何从中获取 html 内容。 http://cksource.com/ckeditor 我在网上搜索发现一个说使用 getData() 方法,但没有 getData () 方法在控制器后键入点。谁能给我一个示例代码来从 CKEditor 控制器获取 html?先感谢您。
要从编辑器获取 htmlData,您应该使用以下代码片段:
var htmldata = CKEDITOR.instances.Editor.document.getBody().getHtml();
Run Code Online (Sandbox Code Playgroud)
如果此解决方案不起作用,请检查您是否BBCode安装了插件。
| 归档时间: |
|
| 查看次数: |
12836 次 |
| 最近记录: |