讨论区编辑器加上其他的按钮

This commit is contained in:
yutao 2015-06-05 14:16:21 +08:00
parent 2e7c6c4afb
commit 18e41e562a
1 changed files with 13 additions and 13 deletions

View File

@ -1,11 +1,11 @@
<style type="text/css"> <style type="text/css">
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;} /*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;} span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )} span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;} div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;} span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;} span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;} div.ke-toolbar .ke-outline{border:none;}*/
.break_word {width:100%;} .break_word {width:100%;}
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -33,7 +33,8 @@
else if (window.attachEvent) else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus) window.attachEvent("onload", buildsubmenus)
</script> </script>
<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %> <%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<%#= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
<% if @project %> <% if @project %>
<%= render :partial => 'project_show', locals: {project: @project} %> <%= render :partial => 'project_show', locals: {project: @project} %>
@ -123,21 +124,20 @@ function nh_init_board(params){
if(params.textarea.data('init') == undefined){ if(params.textarea.data('init') == undefined){
//初始化编辑器 //初始化编辑器
var editor = params.kindutil.create(params.textarea, { var editor = params.kindutil.create(params.textarea, {
resizeType : 1, // allowPreviewEmoticons : false,
allowPreviewEmoticons : false, // allowImageUpload : false,
allowImageUpload : false, resizeType : 1,minWidth:"1px",width:"565px",height:"150px",
minWidth:"1px", allowFileManager:true,uploadJson:"/kindeditor/upload",
width:"565px", fileManagerJson:"/kindeditor/filemanager",
items : ['emoticons'],
afterChange:function(){//按键事件 afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
}, },
afterCreate:function(){ afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.about_talk); // var toolbar = $("div[class='ke-toolbar']",params.about_talk);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); // $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar); // params.toolbar_container.append(toolbar);
} }
}); }).loadPlugin('paste');
//主题输入框按键事件 //主题输入框按键事件
params.inputsubject.keyup(function(){ params.inputsubject.keyup(function(){