close
客戶要求 Html.Editor 不顯示scrollbar,直接往下延伸
他們是看到Accupass活動通是這樣做,所以要求他們的網頁也要比照
網頁上的Html Editor 是CKEditor
他有一個plugin 是autogrow 可以做到這個要求
方法是
1.到 http://ckeditor.com/addon/autogrow 下載套件,解壓縮後 把整個整個目錄 copy 到 專案 Scripts\ckeditor\plugins 裡(假設你是放這)
2.如果你是用jquery 對dom套上ckeditor
那語法就是
$('#Content').ckeditor({
customConfig: '/Scripts/ckeditor/config.js',
height: 140,
filebrowserImageUploadUrl: '/Event/UploadPicture?guid=' + $('#Guid').val(),
extraPlugins: 'autogrow',
autoGrow_minHeight: 200,
autoGrow_maxHeight: 900,
autoGrow_bottomSpace: 50,
removePlugins: 'resize'
customConfig: '/Scripts/ckeditor/config.js',
height: 140,
filebrowserImageUploadUrl: '/Event/UploadPicture?guid=' + $('#Guid').val(),
extraPlugins: 'autogrow',
autoGrow_minHeight: 200,
autoGrow_maxHeight: 900,
autoGrow_bottomSpace: 50,
removePlugins: 'resize'
});
文章標籤
全站熱搜
留言列表