好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 比較不錯的修改FCKEditor的修改方法

比較不錯的修改FCKEditor的修改方法

熱門標簽:智能電銷機器人真的好嗎 企業電話機器人辦理 靈聲智能電話機器人招聘 長春銷售外呼系統業務 長春防封卡電銷卡套餐 四平電話機器人哪家好 興化400電話辦理多少錢 天津電銷卡外呼系統線路 株洲外呼營銷系統有哪些

修改后的代碼下載http://www.cnblogs.com/Files/Truly/FCKeditor_Truly.rar
本地下載地址
由于項目需要,近期仔細研究了FCKEditor。發現一下bug,以及缺少的一些東西。

一、防止連續文本導致出現滾動條
        FCKEditor編輯器使用Iframe來處理編輯器內容,可惜不支持文本換行,假如你連續輸入一段英文或數字等,將會出現滾動條,這時我們需要給其增加word-wrap樣式為break-word;

添加方式有很多,我選擇最便捷的修改方式:具體做法是修改fckeditor.html文件,給iframe id="eEditorArea" 增加事件 onload="window.frames['eEditorArea'].document.body.style.wordWrap='break-word'"

二、增加Media以及Realplay按鈕
      此項工作相對龐大,要修改很多js文件,以及一些圖片和樣式文件。
      a.準備圖片:FCKeditor\editor\css\images下面,添加fck_medialogo.gif和fck_realplaylogo.gif,大小隨意,作為背景居中顯示的。
FCKeditor\editor\skins\default\toolbar\增加media.gif和realplay.gif,其他皮膚類推。
      b.修改css:給FCKeditor\editor\css\fck_internal.css增加

.FCK__Media
{
 border: darkgray 1px solid;
 background-position: center center;
 background-image: url(images/fck_medialogo.gif);
 background-repeat: no-repeat;
 width: 80px ;
 height: 80px ;
}

.FCK__Realplay
{
 border: darkgray 1px solid;
 background-position: center center;
 background-image: url(images/fck_realplaylogo.JPG);
 background-repeat: no-repeat;
 width: 80px ;
 height: 80px ;
}
c。修改js,主要以realplay做示例
FCKeditor\editor\js\fckeditorcode_ie_1.js,在FCKDocumentProcessors.addItem(FCKFlashProcessor);后面增加
// Realplay begin
var FCKRealplayProcessor=new Object();
FCKRealplayProcessor.ProcessDocument=function(A){
    var B=A.getElementsByTagName('EMBED');
    var C;
    var i=B.length-1;

while (i>=0(C=B[i--])){
if (C.src.endsWith('.rm',true) || C.src.endsWith('.ram',true) || C.src.endsWith('.ra',true))
{var D=FCKDocumentProcessors_CreateFakeImage('FCK__Realplay',C.cloneNode(true));
D.setAttribute('_fckRealplay','true',0);
FCKRealplayProcessor.RefreshView(D,C);
C.parentNode.insertBefore(D,C);
C.parentNode.removeChild(C);
};
};
};

FCKRealplayProcessor.RefreshView=function(A,B){
    if (B.width>0) A.style.width=FCKTools.ConvertHtmlSizeToStyle(B.width);
    if (B.height>0) A.style.height=FCKTools.ConvertHtmlSizeToStyle(B.height);
};
FCKDocumentProcessors.addItem(FCKRealplayProcessor);
// Realplay end
var FCKMediaProcessor=new Object();
FCKMediaProcessor.ProcessDocument=function(A)
{
    var B=A.getElementsByTagName('EMBED');
    var C;
    var i=B.length-1;
    while (i>=0(C=B[i--]))
    {
        if (C.src.endsWith('.avi',true) || C.src.endsWith('.mpg',true) || C.src.endsWith('.mpeg',true))
        {
            var D=FCKDocumentProcessors_CreateFakeImage('FCK__Media',C.cloneNode(true));
            D.setAttribute('_fckmedia','true',0);FCKMediaProcessor.RefreshView(D,C);
            C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);
        };
    };
};
FCKMediaProcessor.RefreshView=function(A,B)
{
    if (B.width>0) A.style.width=FCKTools.ConvertHtmlSizeToStyle(B.width);
    if (B.height>0) A.style.height=FCKTools.ConvertHtmlSizeToStyle(B.height);
};
FCKDocumentProcessors.addItem(FCKMediaProcessor);

然后修改FCK.GetRealElement方法為下面代碼,該方法為處理編輯器中width和height的調整
FCK.GetRealElement=function(A){
var e=FCKTempBin.Elements[A.getAttribute('_fckrealelement')];

if (A.getAttribute('_fckflash')|| A.getAttribute('_fckrealplay') || A.getAttribute('_fckmedia')){
    if (A.style.width.length>0) e.width=FCKTools.ConvertStyleSizeToHtml(A.style.width);
    if (A.style.height.length>0) e.height=FCKTools.ConvertStyleSizeToHtml(A.style.height);
};
return e;};

----------
FCKeditor\editor\js\fckeditorcode_ie_2.js
FCKCommands.GetCommand方法增加
case 'Media':B=new FCKDialogCommand('Media',FCKLang.DlgMediaTitle,'dialog/fck_Media.html',450,400);
break;
case 'Realplay':B=new FCKDialogCommand('Realplay',FCKLang.DlgMediaTitle,'dialog/fck_Realplay.html',450,400);
break;

FCKToolbarItems.GetItem方法增加

case 'Media':B=new FCKToolbarButton('Media',FCKLang.InsertMediaLbl,FCKLang.InsertMedia);
break;
case 'Realplay':B=new FCKToolbarButton('Realplay',FCKLang.InsertRealplayLbl,FCKLang.InsertRealplay);
break;
FCKContextMenu._GetGroup方法增加
case 'Media':return new FCKContextMenuGroup(true,this,'Media',FCKLang.MediaProperties,true);
case 'Realplay':return new FCKContextMenuGroup(true,this,'Realplay',FCKLang.RealplayProperties,true);   // truly

FCKContextMenu.RefreshState方法增加
if (this.Groups['Media'])   this.Groups['Media'].SetVisible(B=='IMG'A.getAttribute('_fckmedia'));
if (this.Groups['Realplay'])  this.Groups['Realplay'].SetVisible(B=='IMG'A.getAttribute('_fckrealplay'));


然后要增加'dialog/fck_Media.html'和'dialog/fck_Realplay.html'頁面,具體我懶得再寫了,自己到我的源碼下載里看,我是在2。1的基礎上改的,2.2要做一些調整!

fckconfig.js也有較多調整,但是這個文件非常簡單,自己去看我的源碼吧。
然后就是lang目錄中對常量的定義,搜索一下就很容易得到,沒什么可講。

在然后就可以了,:)。



三、添加刪除按鈕列,類似sina的blog中的編輯控件

四、修改上傳路徑
        默認是根目錄/UserFiles,有多種方式進行修改,先看一下它的源碼:
protected string UserFilesPath
{
 get
 {
  if ( sUserFilesPath == null )
  {
   // Try to get from the "Application".
   sUserFilesPath = (string)Application["FCKeditor:UserFilesPath"] ;

   // Try to get from the "Session".
   if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
   {
    sUserFilesPath = (string)Session["FCKeditor:UserFilesPath"] ;

    // Try to get from the Web.config file.
    if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
    {
     sUserFilesPath = System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"] ;

     // Otherwise use the default value.
     if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
      sUserFilesPath = DEFAULT_USER_FILES_PATH ;

     // Try to get from the URL.
     if ( sUserFilesPath == null || sUserFilesPath.Length == 0 )
     {
      sUserFilesPath = Request.QueryString["ServerPath"] ;
     }
    }
   }

   // Check that the user path ends with slash ("/")
   if ( ! sUserFilesPath.EndsWith("/") )
    sUserFilesPath += "/" ;
  }
  return sUserFilesPath ;
 }
}

由此,可以在Global里或者程序任意位置(加載fckeditor前可以運行到的位置)設置Application["FCKeditor:UserFilesPath"] ,或者Session,或者Webconfig,或者action中的請求參數等。


to be continued...


附:js版FCKEditor下載:http://prdownloads.sourceforge.net/fckeditor/FCKeditor_2.2.zip
.net版
http://prdownloads.sourceforge.net/fckeditor/FCKeditor.Net_2.2.zip
所有版本列表
http://prdownloads.sourceforge.net/fckeditor

標簽:貴港 青海 漯河 新疆 巴彥淖爾 石嘴山 運城 黑龍江

巨人網絡通訊聲明:本文標題《比較不錯的修改FCKEditor的修改方法》,本文關鍵詞  比,較不,錯的,修改,FCKEditor,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《比較不錯的修改FCKEditor的修改方法》相關的同類信息!
  • 本頁收集關于比較不錯的修改FCKEditor的修改方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 一级二级A片无码高潮免费看欧美| 亚洲精品无码一区二区牛牛 | gogogo泰国在线播放| 陈巴尔虎旗| 91久久国产露脸精品国产护士| 国产+无码+精品十欧美| 阿娇陈冠希13分钟视频Av| 女生喊疼男生越往里寨app| 天干天干天夜夜爽啪啪| 《肉体偿还》在线观看| 免费无码又爽又黄又刺激网站| 91精品欧美一区二区三区| 欧美午夜精品理论片A级| 狠狠色7777久夜色撩人安全吗| 午夜性爽爽爽| 在线播放高清视频www| 红桃秘?无码一线二线三| 啊用力老板好棒老板的调教| japanese日本舒服丰满| 亚洲大尺度| 综合久久久久综合体桃花网 | ass俄罗斯肥女肥臀pics| 老人玩小处雌女hd另类 | 色多网站免费视频| 苏玥是我媳妇小说| 亚洲色图制服诱惑| 午夜影院操一| 男男gay网站中国| 女人被躁到高潮免费视频A片小说| 91综合在线视频| 国产第九页| jk美女又爽?又黄?视频| 美女赤身裸体扒开双腿一区二区| 有码中文字幕在线观看| 男女交性视频无遮挡全过程| 太后肉高h| 欧州美女做爰XXXⅩ性爽| 皮带抽打白嫩光屁股sp| 亚洲国产精品无码久久久久高潮| 男生干女生软件| aa级毛片|