我正在尝试将我在所见即所得编辑器(CK编辑器)中输入的内容传递给JQuery。目前,无论我输入什么,它都是空白的。
HTML:
<textarea type='text' class="ckeditor reply" name='reply'></textarea>
<button type="button" STYLE="align: right;" class="btn btn-info reply_button yGreenButton">Submit Reply</button>JS:
<script>
$(function()
{
$('.reply_button').click(function(){
var reply=$(this).siblings('.reply').val();
});
});
</script>文本区域显示为CKeditor。无论我在CKeditor文本区域中输入什么内容,单击reply_button时提示的当前值都是空的。如何让我输入的实际内容被提醒?
我们非常感谢你的建议。
最好的
发布于 2014-02-16 10:31:48
这是一个CKEditor,你必须使用他们的接口:
var editor = CKEDITOR.replace( '.ckeditor' );
editor.getData();接口文档可以在here上找到。
https://stackoverflow.com/questions/21806329
复制相似问题