Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
6bf4a3dd13
|
@ -82,13 +82,19 @@ function nh_init_board(params){
|
|||
var editor = params.kindutil.create(params.textarea, {
|
||||
// allowPreviewEmoticons : false,
|
||||
// allowImageUpload : false,
|
||||
autoHeightMode : true,
|
||||
resizeType : 1,minWidth:"1px",width:"560px",height:"150px",
|
||||
allowFileManager:true,uploadJson:"/kindeditor/upload",
|
||||
fileManagerJson:"/kindeditor/filemanager",
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
// var edit = this.edit;
|
||||
// var body = edit.doc.body;
|
||||
// edit.iframe.height(minHeight);
|
||||
// this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 30, minHeight));
|
||||
},
|
||||
afterCreate:function(){
|
||||
this.loadPlugin("autoheight");
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
if(/trident/.test(userAgent)){
|
||||
$("div.talk_new .ke-container").css({'margin-left':'0px'});
|
||||
|
|
|
@ -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 = {})
|
||||
|
|
Loading…
Reference in New Issue