在rails 3.2.9中,我使用bootstrap的wysihtml5编辑器来处理一个文本区域字段,但是在IE9中我没有得到该字段的(文本区域)值。我正在通过ajax加载一个表单,以便在保存之前预览此文本域的详细信息。在IE-10中它工作得很好。
在application.js中
//= require bootstrap-wysihtml5在application.css中
*= require bootstrap-wysihtml5序列化表单时,我没有获得文本字段的值
form_data = jQuery("#form_id").serialize();
jQuery.ajax({type :'POST', url : '/user/preview.js?', data : form_data});在视图中,
<%= f.input :description, :as=>:text, :label =>false, :required => false, :placeholder=>"Description", :input_html=>{:rows=>"10", :class=>"texteditor", :style=>"width: 520px;"} %>在脚本中,
function loadTextEditor(){
$('.texteditor').wysihtml5();
}
window.onload = loadTextEditor();如何在通过ajax保存之前获取texteditor的值。请帮我解决这个问题。
发布于 2013-04-26 14:20:24
您是否尝试过在inspect element > console上查找该错误
发布于 2013-05-08 22:13:03
始终使用编辑器对象来获取文本区域的值:
$('.texteditor').data("wysihtml5").editor.getValue();https://stackoverflow.com/questions/16229933
复制相似问题