通过 kindeditor_tag f.kindeditor生产的编辑框可以自动长高缩短

This commit is contained in:
lizanle 2015-09-09 09:52:39 +08:00
parent 169c56a58d
commit faf5f1eab5
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@ module RailsKindeditor
input_html = input_html.merge(style: 'display:none')
output = ActiveSupport::SafeBuffer.new
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true')))
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
:autoHeightMode=>true,
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})')))
end
def kindeditor(name, method, options = {})