1
我正在为我的项目(MVC 4应用程序)使用Kendo UI编辑器。如何获取按钮点击kendo编辑器文本的文本
在按钮单击事件中,我需要在用户输入文本并单击预览按钮时在另一个div中显示编辑器文本。
我该怎么做?
我正在为我的项目(MVC 4应用程序)使用Kendo UI编辑器。如何获取按钮点击kendo编辑器文本的文本
在按钮单击事件中,我需要在用户输入文本并单击预览按钮时在另一个div中显示编辑器文本。
我该怎么做?
试试这个:
function getClick(e) {
try { //the name of your editor
var editor = $("#editor").data("kendoEditor");
var editorContent = editor.value();
alert(editorContent);
//Do Your stuff here
}
catch (e) { }
}
然后用一个按钮
<button class="k-button" id="btnPreviewContent" onclick="getClick()">PreviewEditor Content</button>
打电话,当我尝试这个我只得到了标记的文本。有没有办法获得所有的html标签? –