圖1:Connector的工作流程圖
水若寒 回復于:2004-12-05 11:08:21
| 很好,試驗中....
| xmlv 回復于:2004-12-06 10:29:29
| 不錯
| tjyihui 回復于:2004-12-07 17:30:46
| 在使用FCKeditor 2.0時遇到的2個問題
1、漢化問題
FCKeditor 2.0是不支持中文的,不過查看了一下自帶的幫助文件,發現可以自定義語言版本,方法如下
(1)編輯edit/lang/fcklanguagemanager.js
將下面語句
FCKLanguageManager.AvailableLanguages =
{
'ar' : 'Arabic',
'bs' : 'Bosnian',
'ca' : 'Catalan',
'en' : 'English',
'es' : 'Spanish',
'et' : 'Estonian',
'fi' : 'Finnish',
'fr' : 'French',
'gr' : 'Greek',
'he' : 'Hebrew',
'hr' : 'Croatian',
'it' : 'Italian',
'ko' : 'Korean',
'lt' : 'Lithuanian',
'no' : 'Norwegian',
'pl' : 'Polish',
'sr' : 'Serbian (Cyrillic)',
'sr-latn' : 'Serbian (Latin)',
'sv' : 'Swedish'
}
添加一行 'zh-cn' : 'Chinese' 從而變成
FCKLanguageManager.AvailableLanguages =
{
'ar' : 'Arabic',
'bs' : 'Bosnian',
'ca' : 'Catalan',
'en' : 'English',
'es' : 'Spanish',
'et' : 'Estonian',
'fi' : 'Finnish',
'fr' : 'French',
'gr' : 'Greek',
'he' : 'Hebrew',
'hr' : 'Croatian',
'it' : 'Italian',
'ko' : 'Korean',
'lt' : 'Lithuanian',
'no' : 'Norwegian',
'pl' : 'Polish',
'sr' : 'Serbian (Cyrillic)',
'sr-latn' : 'Serbian (Latin)',
'sv' : 'Swedish',
'zh-cn' : 'Chinese'
}
然后在參照editor/lang/en.js進行翻譯,把翻譯的結果以UTF-8編碼保存為zh-cn.js的文件保存在
editor/lang目錄下就可以了。那么再調用FCKeditor時,就會自動進行加載zh-cn.js完成漢化。但是我按
照這個步驟完成后在調用FCKeditor時會出現錯誤,不知道問題出在哪里。我已經把自己漢化好的zh-cn.js
上傳到我的網站上: http://www.shaof.com/download/zh-cn.js 大家如果有興趣可以下載下來試試,看
看能否成功。
2、圖片文件上傳路徑問題
安裝我文章里面的設置,上傳路徑設置為UserFiles/,但是上傳圖片文件時,FCKeditor都自動把文件上傳到UserFiles/image目錄下面,自做主張的建立了一個image目錄,很是不爽。原因不明。
希望對FCKeditor感興趣的朋友一起來解決這兩個問題。
| Tung 回復于:2004-12-07 22:39:06
| 不支持中文?那怎么應用?觀望中。。。
| tjyihui 回復于:2004-12-08 07:11:59
| to Tung
不是不支持中文輸入和顯示,而是FCKeditor的界面不能實現漢化,見我上傳的圖2中,如upload,應該顯示為“上傳”的。
| xmlv 回復于:2004-12-08 08:43:40
| 樓主在天津?有空拜訪拜訪
| Tung 回復于:2004-12-08 08:46:39
| [quote:f7de2f5ba1="tjyihui"]to Tung
不是不支持中文輸入和顯示,而是FCKeditor的界面不能實現漢化,見我上傳的圖2中,如upload,應該顯示為“上傳”的。[/quote:f7de2f5ba1]
呵呵,不好意思,理解錯誤。
界面漢化可以更好推廣,Try。
| muyan 回復于:2004-12-08 09:42:14
| 2、修改配置文件FCKeditor\editor\filemanager\browser\default\connectors\php\connector.php
// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
UserFiles為文件上傳的路徑,與本文開頭所給的例子相對應,大家可以自行修改。
第二步不需要
// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '' ;
if ( isset( $_GET['ServerPath'] ) )
{
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;
}
else
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
// Map the "UserFiles" path to a local directory.
$GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ;
源文件中有判斷,應該更改$GLOBALS["UserFilesPath"] = '/UserFiles/' ;默認路徑
| fans1 回復于:2004-12-08 15:55:45
| /*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: en.js
* English language file.
*
* Version: 2.0 RC1
* Modified: 2004-11-26 01:58:51
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var FCKLang =
{
// Language direction : "ltr" (left to right) or "rtl" (right to left).
Dir : "ltr",
ToolbarCollapse : "Collapse Toolbar",
ToolbarExpand : "Expand Toolbar",
// Toolbar Items and Context Menu
Save : "保存",
NewPage : "新建頁面",
Preview : "預覽",
Cut : "剪切",
Copy : "拷貝",
Paste : "粘貼",
PasteText : "純文本粘貼",
PasteWord : "來自Word的粘貼",
Print : "打印",
SelectAll : "選擇全部",
RemoveFormat : "去除格式",
InsertLinkLbl : "鏈接",
InsertLink : "插入/編輯 鏈接",
RemoveLink : "去除鏈接",
InsertImageLbl : "圖片",
InsertImage : "插入/編輯 圖片",
InsertTableLbl : "表格",
InsertTable : "插入/編輯 表格",
InsertLineLbl : "水平線",
InsertLine : "插入水平線",
InsertSpecialCharLbl: "特殊字符",
InsertSpecialChar : "插入特殊字符",
InsertSmileyLbl : "表情符號",
InsertSmiley : "插入表情符號",
About : "關于FCKeditor",
Bold : "粗體",
Italic : "斜體",
Underline : "下劃線",
StrikeThrough : "文字刪除線",
Subscript : "下標",
Superscript : "上標",
LeftJustify : "左對齊",
CenterJustify : "居中對齊",
RightJustify : "右對齊",
BlockJustify : "兩端對齊",
DecreaseIndent : "減少縮進",
IncreaseIndent : "增加縮進",
Undo : "撤銷",
Redo : "還原",
NumberedListLbl : "自動編號",
NumberedList : "插入/刪除 自動編號",
BulletedListLbl : "項目符號",
BulletedList : "插入/刪除 項目符號",
ShowTableBorders : "顯示表格線",
ShowDetails : "顯示明細",
Style : "樣式",
FontFormat : "格式",
Font : "字體",
FontSize : "字體大小",
TextColor : "字體顏色",
BGColor : "背景色",
Source : "Html格式",
Find : "查找",
Replace : "替換",
// Context Menu
EditLink : "編輯鏈接",
InsertRow : "插入行",
DeleteRows : "刪除行",
InsertColumn : "插入列",
DeleteColumns : "刪除列",
InsertCell : "插入單元格",
DeleteCells : "刪除單元格",
MergeCells : "合并單元格",
SplitCell : "拆分單元格",
CellProperties : "單元格屬性",
TableProperties : "表格屬性",
ImageProperties : "圖片屬性",
FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6",
// Alerts and Messages
ProcessingXHTML : "正在處理XHTML. 請稍等...",
Done : "完成",
PasteWordConfirm : "粘貼的內容來自Word. 你需要去除它的格式嗎?",
NotCompatiblePaste : "這個操作需要Internet Explorer version 5.5 或以上版本. 你需要粘貼它而不去除格式嗎",
UnknownToolbarItem : "未知的工具欄項目 \"%1\"",
UnknownCommand : "未知的命令名 \"%1\"",
NotImplemented : "命令無法執行",
UnknownToolbarSet : "工具欄設置 \"%1\" 不存在",
// Dialogs
DlgBtnOK : "確定",
DlgBtnCancel : "取消",
DlgBtnClose : "關閉",
DlgAdvancedTag : "高級",
// General Dialogs Labels
DlgGenNotSet : "¬ set&",
DlgGenId : "Id",
DlgGenLangDir : "Language Direction",
DlgGenLangDirLtr : "Left to Right (LTR)",
DlgGenLangDirRtl : "Right to Left (RTL)",
DlgGenLangCode : "Language Code",
DlgGenAclearcase/" target="_blank" >ccessKey : "Access Key",
DlgGenName : "Name",
DlgGenTabIndex : "Tab Index",
DlgGenLongDescr : "Long Description URL",
DlgGenClass : "Stylesheet Classes",
DlgGenTitle : "Advisory Title",
DlgGenContType : "Advisory Content Type",
DlgGenLinkCharset : "Linked Resource Charset",
DlgGenStyle : "Style",
// Image Dialog
DlgImgTitle : "圖片屬性",
DlgImgInfoTab : "圖片內容",
DlgImgBtnUpload : "放送到服務器",
DlgImgURL : "地址",
DlgImgUpload : "上傳",
DlgImgBtnBrowse : "瀏覽服務器",
DlgImgAlt : "替換的文本",
DlgImgWidth : "寬度",
DlgImgHeight : "高度",
DlgImgLockRatio : "鎖定比例",
DlgBtnResetSize : "重置尺寸",
DlgImgBorder : "邊框",
DlgImgHSpace : "橫向坐標",
DlgImgVSpace : "縱向坐標",
DlgImgAlign : "對齊方式",
DlgImgAlignLeft : "左邊",
DlgImgAlignAbsBottom: "絕對靠底",
DlgImgAlignAbsMiddle: "絕對靠中",
DlgImgAlignBaseline : "基準線",
DlgImgAlignBottom : "靠底",
DlgImgAlignMiddle : "靠中",
DlgImgAlignRight : "靠右",
DlgImgAlignTextTop : "文字頂",
DlgImgAlignTop : "頂端",
DlgImgPreview : "預覽",
DlgImgMsgWrongExt : "對不起, 只運行上傳以下類型的文件:\n\n" + FCKConfig.ImageUploadAllowedExtensions + "\n\n操作取消.",
DlgImgAlertSelect : "請選擇要上傳的文件.",
DlgImgAlertUrl : "Please type the image URL",
// Link Dialog
DlgLnkWindowTitle : "鏈接",
DlgLnkInfoTab : "鏈接內容",
DlgLnkTargetTab : "目標",
DlgLnkType : "鏈接類型",
DlgLnkTypeURL : "地址",
DlgLnkTypeAnchor : "書簽",
DlgLnkTypeEMail : "E-Mail",
DlgLnkProto : "Protocol",
DlgLnkProtoOther : "&other&",
DlgLnkURL : "URL",
DlgLnkBtnBrowse : "瀏覽服務器",
DlgLnkAnchorSel : "Select an Anchor",
DlgLnkAnchorByName : "By Anchor Name",
DlgLnkAnchorById : "By Element Id",
DlgLnkNoAnchors : "&No anchors available in the document&",
DlgLnkEMail : "E-Mail Address",
DlgLnkEMailSubject : "Message Subject",
DlgLnkEMailBody : "Message Body",
DlgLnkUpload : "上傳",
DlgLnkBtnUpload : "發送到服務器",
DlgLnkTarget : "目標",
DlgLnkTargetFrame : "&frame&",
DlgLnkTargetPopup : "&popup window&",
DlgLnkTargetBlank : "新建窗口 (_blank)",
DlgLnkTargetParent : "父框架 (_parent)",
DlgLnkTargetSelf : "相同框架 (_self)",
DlgLnkTargetTop : "整頁 (_top)",
DlgLnkTargetFrame : "Target Frame Name",
DlgLnkPopWinName : "Popup Window Name",
DlgLnkPopWinFeat : "Popup Window Features",
DlgLnkPopResize : "Resizable",
DlgLnkPopLocation : "Location Bar",
DlgLnkPopMenu : "Menu Bar",
DlgLnkPopScroll : "Scroll Bars",
DlgLnkPopStatus : "Status Bar",
DlgLnkPopToolbar : "Toolbar",
DlgLnkPopFullScrn : "全屏 (IE)",
DlgLnkPopDependent : "Dependent (Netscape)",
DlgLnkPopWidth : "寬度",
DlgLnkPopHeight : "高度",
DlgLnkPopLeft : "Left Position",
DlgLnkPopTop : "Top Position",
DlgLnkMsgWrongExtA : "對不起, 只運行上傳以下類型的文件:\n\n" + FCKConfig.LinkUploadAllowedExtensions + "\n\n操作取消.",
DlgLnkMsgWrongExtD : "對不起, 以下類型的文件不運行上傳:\n\n" + FCKConfig.LinkUploadAllowedExtensions + "\n\n操作取消.",
DlnLnkMsgNoUrl : "Please type the link URL",
DlnLnkMsgNoEMail : "Please type the e-mail address",
DlnLnkMsgNoAnchor : "Please select an anchor",
// Color Dialog
DlgColorTitle : "顏色選擇",
DlgColorBtnClear : "清除",
DlgColorHighlight : "高亮",
DlgColorSelected : "已選擇",
// Smiley Dialog
DlgSmileyTitle : "插入一個表情符號",
// Special Character Dialog
DlgSpecialCharTitle : "選擇特殊字符",
// Table Dialog
DlgTableTitle : "表格屬性",
DlgTableRows : "行數",
DlgTableColumns : "列數",
DlgTableBorder : "邊框大小",
DlgTableAlign : "對齊方式",
DlgTableAlignNotSet : "<無>",
DlgTableAlignLeft : "居左",
DlgTableAlignCenter : "居中",
DlgTableAlignRight : "居右",
DlgTableWidth : "寬度",
DlgTableWidthPx : "像素",
DlgTableWidthPc : "百分比",
DlgTableHeight : "高度",
DlgTableCellSpace : "單元格間距",
DlgTableCellPad : "單元格填充",
DlgTableCaption : "標題",
// Table Cell Dialog
DlgCellTitle : "單元格屬性",
DlgCellWidth : "寬度",
DlgCellWidthPx : "像素",
DlgCellWidthPc : "百分比",
DlgCellHeight : "高度",
DlgCellWordWrap : "自動折行",
DlgCellWordWrapNotSet : "<無>",
DlgCellWordWrapYes : "是",
DlgCellWordWrapNo : "否",
DlgCellHorAlign : "水平對齊方式",
DlgCellHorAlignNotSet : "<無>",
DlgCellHorAlignLeft : "居左",
DlgCellHorAlignCenter : "居中",
DlgCellHorAlignRight: "居右",
DlgCellVerAlign : "垂直對齊方式",
DlgCellVerAlignNotSet : "<無>",
DlgCellVerAlignTop : "頂端",
DlgCellVerAlignMiddle : "居中",
DlgCellVerAlignBottom : "底端",
DlgCellVerAlignBaseline : "基準線",
DlgCellRowSpan : "行跨越",
DlgCellCollSpan : "列跨越",
DlgCellBackColor : "背景色",
DlgCellBorderColor : "單元線顏色",
DlgCellBtnSelect : "選擇...",
// Find Dialog
DlgFindTitle : "查找",
DlgFindFindBtn : "查找",
DlgFindNotFoundMsg : "指定字符無法找到.",
// Replace Dialog
DlgReplaceTitle : "替換",
DlgReplaceFindLbl : "替換內容:",
DlgReplaceReplaceLbl : "替換為:",
DlgReplaceCaseChk : "區分大小寫",
DlgReplaceReplaceBtn : "替換",
DlgReplaceReplAllBtn : "全部替換",
DlgReplaceWordChk : "完全匹配",
// Paste Operations / Dialog
PasteErrorPaste : "你的瀏覽器安全設置不允許編輯器自動執行粘貼操作。請使用快捷鍵(Ctrl+V)手工執行.",
PasteErrorCut : "你的瀏覽器安全設置不允許編輯器自動執行剪切操作。請使用快捷鍵(Ctrl+X)手工執行.",
PasteErrorCopy : "你的瀏覽器安全設置不允許編輯器自動執行拷貝操作。請使用快捷鍵(Ctrl+C)手工執行.",
PasteAsText : "純文本粘貼",
PasteFromWord : "來自Word的粘貼",
DlgPasteMsg : "The editor was not able to automaticaly execute pasting because of the <STRONG>security settings</STRONG> of your browser.<BR>Please paste inside the following box using the keyboard (<STRONG>Ctrl+V</STRONG>) and hit <STRONG>OK</STRONG>.",
// Color Picker
ColorAutomatic : "自動",
ColorMoreColors : "更多顏色...",
// About Dialog
DlgAboutVersion : "版本",
DlgAboutLicense : "Licensed under the terms of the GNU Lesser General Public License",
DlgAboutInfo : "查看更多信息請到"
}
| fans1 回復于:2004-12-08 15:58:16
| 其實用firefox的java控制臺幾下就能調好了,就是一些小問題而已
| tjyihui 回復于:2004-12-09 08:48:48
| 第一個漢化的問題已經解決啦。原來是那個zh-cn.js不是UTF-8編碼格式,所以導致不能使用。 我已經更新了http://www.shaof.com/download/zh-cn.js
大家可以去下載,然后安裝我上面說的方法就可以實現界面的漢化了。
| xmlv 回復于:2004-12-09 09:12:59
| ??我加上zh-cn:Chinese就報錯
js錯誤信息為:
行:21
字符:1
錯誤:'fcklanguagemanager'未定義
| minimu 回復于:2004-12-13 10:43:45
| 樓主幫忙
我安裝FCKeditor,安裝你上面所說的
總是提示fckeditor.html JavaScript錯誤
說23行缺少":"
| muyan 回復于:2004-12-17 14:09:04
| 這些都不是問題,關鍵是6.0下根本沒法用
| xmlv 回復于:2004-12-18 15:40:30
| 怎么讓工具條默認是折疊???
| xmlv 回復于:2004-12-18 16:39:55
| get it.
$editor->Config = Array("ToolbarStartExpanded"=>"false");
| 夜貓子 回復于:2004-12-18 17:05:35
| 在FCKEditor下你可以看到一個fckconfig.js文件,里邊有諸如
FCKConfig.CustomConfigurationsPath
FCKConfig.EditorAreaCSS
這樣一些東西
通過$FCKEditor->Config,就可以改變這些設置
比如xmlv說的那樣
| 水若寒 回復于:2004-12-19 20:02:22
| Linux作服務器,安裝FCK2.0,IE6無法正常顯示,FIREFOX可以....
| cagecn 回復于:2004-12-20 20:34:10
| 我改了
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
但還是錯的
還需要改什么
UserFiles在什么地方
mozilla下有這個錯誤
錯誤: this.DOMDocument has no properties
源文件:http://127.0.0.1/FCKeditor/editor/filemanager/browser/default/js/fckxml.js
行:102
ie6(xp sp2)下
frmresourceslist.html文件119行2列錯誤
提示缺少對象
請求解答,謝謝
| sobo 回復于:2004-12-20 22:21:23
| 請問樓主,怎么在編輯器中預置一段文字呢?
比如:
<?php
$value="test";
//引入在線編輯器
include("./FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../FCKeditor/' ;
$oFCKeditor->ToolbarSet = 'Default' ;
$oFCKeditor->InstanceName = 'EditorDefault' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '400' ;
$oFcKeditor->value = $value ;
$oFCKeditor->Create() ;
?>
好像不行,這里應該怎么用呢?
| tjyihui 回復于:2004-12-21 22:27:51
| to sobo
對于你的疑問建議你看一下FCKeditor自帶的范例程序。
下面是我寫的一段代碼
<?php
//引入在線編輯器
include("../FCKeditor/fckeditor.php") ;
$ArticleContent="test";
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../FCKeditor/' ;
$oFCKeditor->ToolbarSet = 'Shaof' ;
$oFCKeditor->Value = $ArticleContent ;
$oFCKeditor->InstanceName = 'EditorDefault' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '400' ;
$oFCKeditor->Create() ;
?>
應該是沒問題的
| xmlv 回復于:2004-12-22 11:29:50
| 明顯的路徑錯誤啊
| cagecn 回復于:2004-12-22 18:24:06
| rc2出來了
我的問題已解決,有人需要我可以把rc1的文件給他,初步斷定是文件的編碼不對
| zhaochao 回復于:2005-01-08 00:52:47
| 我是 新人 大家照顧照顧
| StartNow 回復于:2005-01-17 15:32:54
| 用了rc 2 發現了一些問題, 在有的機子上是正常的, 有的機子上會提示 js錯誤 無法正常顯示. firefox 下面除了中文部分顯示亂碼外 其他正常。
一些朋友也同樣有這個問題:
http://community.csdn.net/Expert/topic/3639/3639328.xml?temp=.6439783
不解!!!
| mjy1225 回復于:2005-05-14 02:29:14
| 上傳文件那,少了個刪除功能,我想添加上去,不知道要修改那一個文件??
| hightman 回復于:2005-05-16 01:01:23
| 不覺得FCKeditor實在是太慢了嗎?
我曾經花了不少時間整合修改, 結果被用戶狂罵太慢,而且不支持IE5.0(很多人用win98沒升級).... :(
| mayichao 回復于:2005-06-10 17:53:29
| 兄弟們,有誰解決過這種問題的,幫個忙吧。
在IE中總是說缺少“:”。
| HonestQiao 回復于:2005-06-10 22:36:46
| 我用過,每什么問題的
| zyzhao 回復于:2005-06-24 13:42:33
| 請問一下在IE6.0.2800.1106下無法使用,老提示缺少“:”;
請問這個問題怎么解決。
謝謝。
| smaplet 回復于:2005-07-13 09:57:52
| 不好意思問個初級的問題,就是編輯后的內容,我想把他存入數據庫,難道要將生成的html代碼都存入到db里嗎?
| sickcat2004 回復于:2005-07-20 02:16:28
| 在php程序里如何獲得上傳圖片的路徑,名字,希望讓圖片的名字得到處理后再
上傳,是不是得改fck的源代碼?
| nbxmedia 回復于:2005-07-20 10:31:55
| FCK好是好,但是只支持UTF8,如果你的網站是GB編碼的,那最好還是Htmlarea+ImageManager
| HonestQiao 回復于:2005-07-20 11:54:10
| advanceeditor\editor\filemanager\browser\default\connectors\php
看這里的文件
| |
|