Sax*_*man 10 forms ajax asp.net-mvc jquery tinymce
我的表单使用TinyMCE格式化HTML,但不知何故,内容在首次提交时始终为空白.这就是我对提交功能的看法:
$('#commentForm').click('submit', function () {
tinyMCE.triggerSave(true, true);
$(this).ajaxSubmit({
success: function (result) {
if (result.success) {
$('#commentForm')[0].reset();
var newComment = { comment: result.comment };
// Append the new comment to the div
$('#commentTemplate').tmpl(result.comment).appendTo('#commentsTemplate');
}
$('#commentFormStatus').text(result.message);
}
});
return false;
});
Run Code Online (Sandbox Code Playgroud)
我添加tinyMCE.triggerSave(true,true);但它似乎不起作用.有什么建议吗?
谢谢.
A.B*_*uin 19
尝试更换
tinyMCE.triggerSave(true, true);
Run Code Online (Sandbox Code Playgroud)
通过
tinyMCE.get("id").save();
Run Code Online (Sandbox Code Playgroud)
其中"id"是您的textarea的ID.
| 归档时间: |
|
| 查看次数: |
13425 次 |
| 最近记录: |