From faf5f1eab5cc9208d4acc02d168c45e5c25dc424 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 9 Sep 2015 09:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=20kindeditor=5Ftag=20f.kinde?= =?UTF-8?q?ditor=E7=94=9F=E4=BA=A7=E7=9A=84=E7=BC=96=E8=BE=91=E6=A1=86?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E8=87=AA=E5=8A=A8=E9=95=BF=E9=AB=98=E7=BC=A9?= =?UTF-8?q?=E7=9F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rails_kindeditor/lib/rails_kindeditor/helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb index c9908d80f..6ed45d92e 100644 --- a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb +++ b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb @@ -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 = {})