图片撑出在firefox上的问题

This commit is contained in:
guange 2015-05-14 17:45:02 +08:00
parent 52217efcb6
commit 06b17581b1
4 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ module RailsKindeditor
input_html = { :id => id }.merge(options.delete(:input_html) || {})
output = ActiveSupport::SafeBuffer.new
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options))
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true')))
end
def kindeditor(name, method, options = {})
@ -14,7 +14,7 @@ module RailsKindeditor
input_html = (options.delete(:input_html) || {}).stringify_keys
output_buffer = ActiveSupport::SafeBuffer.new
output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'], options))
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true')))
end
def kindeditor_upload_json_path(*args)
@ -50,13 +50,13 @@ module RailsKindeditor
"var old_onload_#{random_name};
if(typeof window.onload == 'function') old_onload_#{random_name} = window.onload;
window.onload = function() {
#{editor_id}KindEditor.create('##{dom_id}', #{get_options(options).to_json});
#{editor_id}KindEditor.create('##{dom_id}', #{get_options(options).to_json}).loadPlugin('paste');
if(old_onload_#{random_name}) old_onload_#{random_name}();
}"
else
"$(function(){KindEditor.ready(function(K){
"KindEditor.ready(function(K){
#{editor_id}K.create('##{dom_id}', #{get_options(options).to_json}).loadPlugin('paste');
});});"
});"
end
end

View File

@ -2773,4 +2773,4 @@ div.repos_explain{
padding-top: 20px;
padding-bottom: 20px;
}
img{max-width: 100%;}
.upload_img img{max-width: 580px;}

View File

@ -423,3 +423,4 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
/*文本左对齐*/
.tl{text-align: left;}
img{max-width: 100%;}
.attachments {clear: both;}

View File