FCK编辑器实在是太臃肿,我一般都不使用,除非需要使用表格,毕竟UBB没有表格功能,PJ4又迟迟不发布,所以就只能自己动手更换编辑器了。之前也尝试过,不知道为什么最后放弃了,今天心血来潮,就又试着更换了一下,这次还是比较顺利,能够完美的兼容,只是那个附件上传功能,我就没有去折腾它了,毕竟我不使用附件功能。我的空间实在是太小,放图片什么的都太奢侈了,所以我的图片都是放在photobucket的图床上面,速度相当的快,而且管理方便,何乐而不为呢。
下面我把我的方法共享出来,也许你会需要,顺便也自己备份一下。
-------------华丽的分割线-------------
1、将下载的xheditor.js以及xheditor_emot、xheditor_plugins和xheditor_skin三个文件夹上传到根目录下的xheditor文件夹。
2、打开header.asp文件
在之前添加代码:
注:因为我之前已经上传过jquery.js文件,所以这次直接调用,如果没有,请上传到相关目录。
3、打开blogpost.asp文件
找到代码:
把以上代码修改为:
找到代码:
<%
if log_editType=0 then
Dim sBasePath
sBasePath = "fckeditor/"
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
oFCKeditor.Config("AutoDetectLanguage") = False
oFCKeditor.Config("DefaultLanguage") = "zh-cn"
oFCKeditor.Value = ""
oFCKeditor.Create "Message"
else
UBB_TextArea_Height="200px;"
UBB_AutoHidden=False
UBBeditor("Message")
end if
%>
把以上代码修改为:
<%
If log_editType = 0 Then
%>
<%
Else
UBB_TextArea_Height = "200px;"
UBB_AutoHidden = False
UBBeditor("Message")
End If
%>
找到代码:
<%
if log_editType=0 then
Dim oFCKeditor1
Set oFCKeditor1 = New FCKeditor
oFCKeditor1.BasePath = sBasePath
oFCKeditor1.Height="150"
oFCKeditor1.ToolbarSet="Basic"
oFCKeditor1.Config("AutoDetectLanguage") = False
oFCKeditor1.Config("DefaultLanguage") = "zh-cn"
oFCKeditor1.Value = ""
oFCKeditor1.Create "log_Intro"
else
%>
<%
end if
%>
把以上代码修改为:
<%
If log_editType = 0 Then
%>
段落标签字体字体大小加粗 (Ctrl+B)斜体 (Ctrl+I)下划线 (Ctrl+U)删除线字体颜色背景颜色对齐列表减少缩进增加缩进超链接 (Ctrl+L)图片表情关于 xhEditor
<%
Else
%>
<%
End If
%>
4、打开blogedit.asp文件
找到代码:
<%
if log_editType=0 then
Dim sBasePath
sBasePath = "fckeditor/"
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = sBasePath
oFCKeditor.Config("AutoDetectLanguage") = False
oFCKeditor.Config("DefaultLanguage") = "zh-cn"
oFCKeditor.Value = UnCheckStr(lArticle.logMessage)
oFCKeditor.Create "Message"
else
UBB_TextArea_Height="200px;"
UBB_AutoHidden=False
UBB_Msg_Value=UBBFilter(UnCheckStr(lArticle.logMessage))
UBBeditor("Message")
end if
%>
把以上代码修改为:
<%
If log_editType = 0 Then
%>
<%
Else
UBB_TextArea_Height = "200px;"
UBB_AutoHidden = False
UBB_Msg_Value = UBBFilter(UnCheckStr(lArticle.logMessage))
UBBeditor("Message")
End If
%>
找到代码:
<%
if log_editType=0 then
Dim oFCKeditor1
Set oFCKeditor1 = New FCKeditor
oFCKeditor1.BasePath = sBasePath
oFCKeditor1.Height="150"
oFCKeditor1.ToolbarSet="Basic"
oFCKeditor1.Config("AutoDetectLanguage") = False
oFCKeditor1.Config("DefaultLanguage") = "zh-cn"
oFCKeditor1.Value = UnCheckStr(lArticle.logIntro)
oFCKeditor1.Create "log_Intro"
else
%>
<%
end if
%>
把以上代码修改为:
<%
If log_editType = 0 Then
%>
段落标签字体字体大小加粗 (Ctrl+B)斜体 (Ctrl+I)下划线 (Ctrl+U)删除线字体颜色背景颜色对齐列表减少缩进增加缩进超链接 (Ctrl+L)图片表情关于 xhEditor
<%
Else
%>
<%
End If
%>
春哥,xhEditor模式下日志中需要插入代码时,具体是怎么编辑的?例如你的日志中的代码是怎么插入进去的,然后使用SyntaxHihglighter高亮!
@Lvtu可以自己添加高亮功能,网上有教程的。
我现用的CKeditor, 有时间也试一下这个东东。。。
@LvtuFCK太臃肿了,网络不好的情况下,很难加载成功。
春哥,你现在也用的这个?
日志中的代码高亮是怎么折腾的?
@Lvtu我现在发表日志都是用的xhEditor,已经彻底把UBB给抛弃了,代码高亮用的SyntaxHihglighter高亮插件。
PJ4用的也是这个东东,EE刚加了图片防盗链。。。
@Lvtu恩。这个编辑器确实比较不错,加载速度也相当OK。就是感觉表格功能不够强大。
[qq02]pj4内侧群里前段时间说pj4马上出,正在调试,打算参加内侧呢,呵呵
@liaokaiEE正在赶呢,希望尽快吧,时不我待,毕竟ZB已经出了2.0。
博主,PJ4还会出吗?我见Zblog都有新版了。并且原来的pJ3有些功能已落后了
@数学人EE的微博一直在更新PJ4的信息,你可以关注下。