<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    不做浮躁的人
    正在行走的人...
    posts - 171,  comments - 51,  trackbacks - 0

    在彈出窗口上訪問編輯器:
    1、如何在編輯器中插入文本:

    前置約定:
    插件名:insertvariables
    插件位置:editor/plugins/insertvariables/

    //創建自己的命令,不采用FCKDialogCommand的目的是FCKDialogCommand使用的是fck的缺省布局。
    var InsertVariableCommand=function(){
    };
    InsertVariableCommand.prototype.Execute=function(){
    }
    //讓按鈕不能點擊。
    InsertVariableCommand.GetState=function() {
    ??????? return FCK_TRISTATE_OFF; }
    //打開彈出窗口
    InsertVariableCommand.Execute=function() {
    ??????? window.open('insertVariable.do', 'insertVariable', 'width=500,height=400,scrollbars=no,scrolling=no,location=no,toolbar=no');
    }
    //注冊命令:
    FCKCommands.RegisterCommand('Insert_Variables', InsertVariableCommand );
    //注冊按鈕
    var oInsertVariables = new FCKToolbarButton('Insert_Variables', 'insert variable');
    oInsertVariables.IconPath = FCKConfig.PluginsPath + 'insertvariables/variable.gif';
    FCKToolbarItems.RegisterItem( 'Insert_Variables', oInsertVariables );

    //插入變量的請求頁面:insertVariable.do
    <html><head> etc...
    <script language="javascript">
            <!--
            var variable            = null;
            var FCK                 = window.opener.FCK;
            function ok() {
                    if(variable != null) {
                            FCK.Focus();
    ????????????????????????//只在ie中有效 var B = FCK.EditorDocument.selection.createRange(); B.text = variable; } window.close(); } //--> </script> </head> <body> etc.. <a href="#" onClick="variable='this is a test'; ok();">insert text</a> </body> </html>

    //在fckconfig.js文件中加入以下字段
    FCKConfig.Plugins.Add( 'insertvariables' ) ;
    FCKConfig.ToolbarSets["myToolbar"] = [
            ['Bold','Italic','Underline'],['Insert_Variables']
    ] ;
    
    				2、關聯上下文菜單選項:
    將插件的command注冊到上下文菜單中:
    FCK.ContextMenu.RegisterListener( { AddItems : function( menu, tag, tagName ) { // 符合條件顯示:if ( tagName == 'IMG' && !tag.getAttribute( '_fckfakelement' ) )
    if ( tagName == 'SPAN' && tag._fckplaceholder ) { // 顯示分隔符
    menu.AddSeparator() ; // 需要注冊命令名,標題,以及圖片路徑。
    ???menu.AddItem( 'placeholder', FCKLang.PlaceholderDlgTitle, oPlaceholderItem.IconPath ) ; } }} );
    posted on 2007-04-10 20:21 不做浮躁的人 閱讀(1197) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     

    <2007年4月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    293012345

    常用鏈接

    留言簿(9)

    隨筆分類(31)

    隨筆檔案(75)

    文章分類(1)

    文章檔案(3)

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲日韩精品国产一区二区三区| 亚洲国产精品成人网址天堂| 亚洲人成在线影院| 国产aⅴ无码专区亚洲av| 亚洲线精品一区二区三区影音先锋 | 亚洲国产av一区二区三区| 日本高清免费中文字幕不卡| 成人永久免费高清| 一本久到久久亚洲综合| 99re6热视频精品免费观看| 小草在线看片免费人成视久网| 色妞www精品视频免费看| 亚洲色图黄色小说| 亚洲男人的天堂在线| 67194在线午夜亚洲| 亚洲成人在线网站| 久久av无码专区亚洲av桃花岛| 国产av无码专区亚洲av果冻传媒| 午夜老司机免费视频| 国产无遮挡色视频免费视频| 亚洲A丁香五香天堂网| 亚洲中文字幕久久精品无码APP| 亚洲av无码专区国产乱码在线观看 | 中文字幕永久免费视频| 国产成人综合亚洲绿色| 在线综合亚洲中文精品| 亚洲精品无码久久久久久| 无码色偷偷亚洲国内自拍| 亚洲中文字幕乱码AV波多JI| 久久精品国产亚洲77777| 日韩亚洲不卡在线视频中文字幕在线观看| 亚洲老熟女五十路老熟女bbw | 亚洲一区二区在线免费观看| 亚洲一区免费在线观看| 美女免费视频一区二区三区| 美女被免费网站91色| 亚洲一级毛片免费观看| 热久久这里是精品6免费观看| 最刺激黄a大片免费网站| 日韩免费无码一区二区视频| 久久久久亚洲AV成人网|