zoukankan      html  css  js  c++  java
  • fckeditor 使用说明

    FCKeditorAPI中文用例说明
    function abc()
      {
       var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例
       alert(checkContent.GetXHTML());//获取当前内容
       var newelement = document.createElement("a");
       newelement.href="#";
       newelement.innerHTML="df";
       checkContent.InsertElement(newelement);//前部添加元素(无返回值)
       var a=checkContent.InsertElementAndGetIt(newelement);//前部添加元素(返回元素)
       checkContent.InsertHtml("<input tyep='text'>")//添加html
       checkContent.SetHTML("<input tyep='text'>",true);//设置内容,后为bool,是否所见即所得
       
      }
      function aaa()
      {
      var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例
      checkContent.SwitchEditMode();//转变编辑模式
      checkContent.UpdateLinkedField();//更新关联文件
      }
    function FCKeditor_OnComplete( checkContent )//当加载完
      {
       alert( checkContent.Name ) ;
      }

    如何插入插件
    在plugins里新建个文件夹.如newthing
    里面有newthing.js newthing.html newthing.gif
     newthing
    /*
    FCKCommands.RegisterCommand(commandName, command)
           commandName - Command name, referenced by the Toolbar, etc...
           command - Command object (must provide an Execute() function).
    */

    // Register the related commands.
    FCKCommands.RegisterCommand(
       'newthing',
        new FCKDialogCommand(
            '新建的按纽',
      '新建的按纽页面',
            FCKConfig.PluginsPath + 'newthing/newthing.html', 340, 170));


    // Create the "newthing" toolbar button.
    var oFindItem = new FCKToolbarButton('newthing', FCKLang['DlgMyFindTitle']);
    oFindItem.IconPath = FCKConfig.PluginsPath + 'newthing/newthing.gif' ;

    // 'newthing' is the name used in the Toolbar config.
    FCKToolbarItems.RegisterItem( 'newthing', oFindItem ) ;
    ;
    newthing.html 上面的

    myconfig
    加上FCKConfig.Plugins.Add( 'newthing', '' ) ;

  • 相关阅读:
    MySQL关于check约束无效的解决办法
    关于constraint的用法
    MySQL关于Duplicate entry '1' for key 'PRIMARY'错误
    iOS实现高斯模糊效果(Swift版本)
    iOS获取视频中的指定帧的两种方法
    Java关于e.printStackTrace()介绍
    iOS关于JSONKit解析Unicode字符内容出错,问题出在u0000
    Java转型(向上转型和向下转型)
    添加删除Windows组件里没有IIS(Internet信息服务)项的解决方法
    Windows2003:“无法加载安装程序库wbemupgd.dll
  • 原文地址:https://www.cnblogs.com/suneryong/p/718168.html
Copyright © 2011-2022 走看看