首页 > 其他分享 >Fckeditor使用手册

Fckeditor使用手册

时间:2022-12-15 16:03:51浏览次数:71  
标签:Fckeditor oEditor OnComplete FCKeditor content oFCKeditor var 使用手册

Fckeditor使用手册_html

Head:

Fckeditor使用手册_html

<script type="text/javascript" src="editor_path/fckeditor.js"></script>

Fckeditor使用手册_html


Fckeditor使用手册_html

Html:

Fckeditor使用手册_html

<textarea id="content" name="content" style="width: 100%"></textarea>

Fckeditor使用手册_html


Fckeditor使用手册_html

Javascript:

Fckeditor使用手册_html

var oFCKeditor = new FCKeditor('content');  // content为textarea的id
oFCKeditor.BasePath = "../FCKeditor/"; // editor跟路径
oFCKeditor.Height = "100%"; // 高度度设置
oFCKeditor.Width = "100%"; // 宽度度度设置
oFCKeditor.ToolbarSet = "None"; // 工具条设置
oFCKeditor.Config["ToolbarStartExpanded"] = false; // 属性配置
oFCKeditor.ReplaceTextarea();

Fckeditor使用手册_html

2. 操作编辑器

Fckeditor使用手册_html

取得对象:

Fckeditor使用手册_html

var oEditor = FCKeditorAPI.GetInstance('content ');

Fckeditor使用手册_html


Fckeditor使用手册_html

取得名字:

Fckeditor使用手册_html

var editorName = oEditor.Name;

Fckeditor使用手册_html


Fckeditor使用手册_html

取得内容:

Fckeditor使用手册_html

var content =  oEditor.GetXHTML(true);

Fckeditor使用手册_html


Fckeditor使用手册_html

设置内容:

Fckeditor使用手册_html

oEditor.SetHTML(‘html’);

Fckeditor使用手册_html


Fckeditor使用手册_html

插入内容到当前光标处:

Fckeditor使用手册_html

oEditor.InsertHtml(‘html’);

Fckeditor使用手册_html


Fckeditor使用手册_html

更新内容到textarea:

Fckeditor使用手册_html

oEditor.UpdateLinkedField();

Fckeditor使用手册_html

 要点:
Fckeditor所有方法和属性的第一个单词的首字母都是大写

3. 有用事件

编辑器加载完毕后会自动调用名字为FCKeditor_OnComplete的函数,并将自身作为参数传递进去,一般在FCKeditor_OnComplete函数初始化编辑器

Fckeditor使用手册_html

function FCKeditor_OnComplete(editorInstance)
...{
// init code
alert(editorInstance.Name) ;
}

---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!

新博客 ​​​https://www.VuejsDev.com​​ 用于梳理知识点



标签:Fckeditor,oEditor,OnComplete,FCKeditor,content,oFCKeditor,var,使用手册
From: https://blog.51cto.com/u_15770151/5940192

相关文章

  • 金蝶AAS-V9精简版使用手册1.6
    1.安装获取中间件安装包(AAAS.V9.ZIP)直接解压即可。1.1.需安装jdk环境,上篇文章1.2.路径没有特定要求,通常放置在/opt下2.初次启动金蝶需要前台启动设置管控密码linux1.......
  • RSS使用手册
    title:Rss使用手册date:2022-11-2613:31:22update:2022-11-2613:31:22abbrlink:rsstags:-RSScategories:-学习-软件编程cover:/images/20221012/RSS-03......
  • 作业收缴系统使用手册(自写开源小系统)
    ​​项目github地址​​​​作业收缴系统设计手册地址​​目录​​系统介绍:​​​​基本功能​​​​管理端​​​​信息管理​​​​1.修改密码​​​​2.学生添加(支持ex......
  • SQLmap使用手册
    SQLmap使用手册参考连接https://www.tr0y.wang/2018/03/21/sqlmap-guide/#SQLmap-介绍SQLmap介绍什么是SQLmapSqlmap是由Python写成的,开源的自动化SQL......
  • 米联客MLK-S01-EG4D20(MGC01Z)开发平台硬件使用手册
    一、产品概述MGC01Z开发板将主芯片直接安装在开发板上,免去装卸和连接器不稳定问题,是系统运行更加稳定可靠。MGC01Z搭载了国产FPGA公司-"安路"的新一代FPGA主芯片:内置128......
  • kafka-consumer-groups 命令行工具使用手册,Kafka 管理必备
    kafka-consumer-groups命令行工具使用手册该手册原文出自​​$KAFKA_HOME\bin\windows\kafka-consumer-groups.bat--help​​命令的输出结果,并由​​Redisant​​提供......
  • GVM使用手册
    https://IP账号:admin密码:ymslx-2022                           ......
  • JVM调优工具使用手册
    ​ 作为Java开发人员,我们肯定知道JDK的bin目录下有"java.exe"、"javac.exe"这两个命令工具,这也是我们平时用得最多的工具。但其实bin目录下还有很多工具,这些工具可以帮助......
  • fckeditor的显示(chrome浏览器不正常显示fckeditor编辑器)
    1、在editor的js文件夹里面的fckeditorcode_ie文件   原  lement().document!=B)returnnull;更改为lement().document&&D.parentElement().document!=B)r......
  • Fiddler使用手册之SSL证书的问题
    首先下载Fiddler,官网5.0版本是免费的。安装设置Tools--options --HTTPS --Connections按下图设置勾选,确保一致。点击确定后。关闭重新打开软件。这时候就已经开......