账号通
    

账号  

密码  

5605

查看

8

回复
主题:[分享]升级到X1.0.150227版本后IE8浏览器,采用百度编辑器添加文章点击保存按钮无反应的修复 [收藏主题] 转到:  
科汛官方 当前离线

47268

主题

145

广播

405

粉丝
添加关注
级别:管理员

用户积分:101604 分
登录次数:7935 次
注册时间:2006/12/7
最后登录:2023/12/14
科汛官方 发表于:2015/3/2 10:42:30   | 显示全部帖子 查看该作者主题 楼主 

问题如题


解决方法:


打开ks_cls/EditorApi.asp


如下代码,增加红色的文字即可。


<%
'******************************************************************
' Software name:KesionCMS X1.0
' Email: service@kesion.com . 营销QQ:4000080263  Tel:400-008-0263
' Web: http://www.kesion.com http://www.kesion.cn
' Copyright (C) Kesion Network All Rights Reserved.
'******************************************************************

'编辑器类型
Function GetEditorType()
GetEditorType="Baidu"     '取值Baidu或CKEditor
End Function

'百度编辑器类型 取值UE或是UM
Function GetEditorTag()
   GetEditorTag="UE"     '取值 UE、UM
End Function


'输出编辑器头文件
Function EchoUeditorHead()
    Dim str,KS
Set KS=New PublicCls
If GetEditorType()="CKEditor" Then
  str=str & "<script type=""text/javascript"" src=""" & KS.Setting(3) & "ckeditor/ckeditor.js""></script>" &vbcrlf
ElseIf GetEditorTag()="UM" Then
  str="<link href=""" & KS.Setting(3) & "umeditor/themes/default/css/umeditor.css"" type=""text/css"" rel=""stylesheet"">"
  str=str & "<script type=""text/javascript"" src=""" & KS.Setting(3) & "umeditor/third-party/jquery.min.js""></script>" &vbcrlf
  str=str & "<script type=""text/javascript"" charset=""gbk"" src=""" & KS.Setting(3) & "umeditor/umeditor.config.js""></script>" &vbcrlf
  str=str & "<script type=""text/javascript"" charset=""gbk"" src=""" & KS.Setting(3) & "umeditor/umeditor.min.js""></script>" &vbcrlf
  str=str & "<script type=""text/javascript"" src=""" & KS.Setting(3) & "umeditor/lang/zh-cn/zh-cn.js""></script>" &vbcrlf
Else
  str="<script type=""text/javascript"" charset=""gbk"" src=""" & KS.Setting(3) & "editor/ueditor.config.js""></script>" &vbcrlf
  str=str & "<script type=""text/javascript"" charset=""gbk"" src=""" & KS.Setting(3) & "editor/ueditor.all.js""> </script>"&vbcrlf
  str=str & "<script type=""text/javascript"" charset=""gbk"" src=""" & KS.Setting(3) & "editor/lang/zh-cn/zh-cn.js""></script>"&vbcrlf
    End If
EchoUeditorHead="<script>var installDir='" & KS.Setting(3) &"';</script>" & vbcrlf & Str
Set KS=Nothing
End Function

'输出编辑器
Function EchoEditor(FieldName,DefaultValue,ToolBar,Width,Height)
Dim str
If GetEditorType()="CKEditor" Then
  str= "<textarea id=""" & fieldname &""" name=""" & fieldname &""">"& Server.HTMLEncode(DefaultValue) &"</textarea><script type=""text/javascript"">CKEDITOR.replace('" & fieldname &"', {width:""" & Width &""",height:""" & height & """,toolbar:""" & ToolBar & """,filebrowserWindowWidth:650,filebrowserWindowHeight:290});</script>"
Else
  str= "<script id=""" & FieldName & """ name=""" & FieldName & """ type=""text/plain"" style=""width:" & Width & ";height:" & Height & ";"">" &DefaultValue&"</script>"
  str= str & "<script>setTimeout(""baidu" & FieldName & " = " & GetEditorTag() &".getEditor('" & FieldName &"',{toolbars:[" & GetEditorToolBar(ToolBar) &"],wordCount:false,autoHeightEnabled:false,scaleEnabled:false,minFrameHeight:420 });"",10);</script>"
End If
EchoEditor=str
End Function
'判断编辑器有没有内容
Function GetEditorContent(FieldName)
Dim str
If GetEditorType()<>"CKEditor" Then
   str="baidu" & FieldName & ".hasContents()"
Else
   str="CKEDITOR.instances."& FieldName &".getData()"
End If
   GetEditorContent=str
End Function
'编辑器得到焦点
Function GetEditorFocus(FieldName)
Dim str
If GetEditorType()<>"CKEditor" Then
   str="baidu" & FieldName & ".focus();"
Else
   str="CKEDITOR.instances."& FieldName &".focus();"
End If
   GetEditorFocus=str
End Function
'向编辑器插入内容
Function InsertEditor(FieldName,codestr)
Dim str
If GetEditorType()<>"CKEditor" Then
  str="baidu"& FieldName &".execCommand('insertHtml', " & codestr & ");"
Else
  str="CKEDITOR.instances."& FieldName &".insertHtml(" &codestr & ");"
End If
  InsertEditor=str
End Function
'编辑器设置初始值
Function EditorSetContent(FieldName,Content)
Dim str
If GetEditorType()<>"CKEditor" Then
  str="baidu"& FieldName &".setContent('" &Content & "');"
Else
  str="CKEDITOR.instances."& FieldName &".setData('" &Content & "');"
End If
  EditorSetContent=str
End Function



'百度编辑器工具栏目定义
Function GetEditorToolBar(TypeFlag)
   Dim Str
   SELECT Case Lcase(TypeFlag)
     Case "basic"
    Str="['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat','|','insertimage', 'emotion']"
     Case "nosourcebasic"
    Str="['fullscreen',  'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat','|','insertimage', 'emotion']"
  Case "newstool"
    Str="['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|','directionalityltr', 'directionalityrtl','indent', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|','link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'insertimage', 'attachment','emotion', 'scrawl', 'insertvideo', 'music',  'map', 'gmap', 'insertframe','insertcode', 'webapp', 'template', 'background', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|','inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', 'pagebreak','preview', 'searchreplace', 'help', 'drafts']"
  Case Else
    Str="['fullscreen', 'source', '|', 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|','rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|','directionalityltr', 'directionalityrtl','indent', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|','link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'map', 'gmap', 'insertframe','insertcode', 'webapp', 'pagebreak', 'template', 'background', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|','inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|','print', 'preview', 'searchreplace', 'help', 'drafts']"
   End Select
     GetEditorToolBar=Str
End Function  
%>

 
KesionCMS,,
  支持(1) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.09570秒 powered by KesionCMS 9.0