php下安装配置fckeditor编辑器的方法


Posted in PHP onMarch 02, 2011

一、PHP调用fckeditor方法。
二、JS调用fckeditor方法。

<?php 
require_once(PATH_PRE.”fckeditor.php”); // 包含fckeditor类, 
$oFCKeditor = new FCKeditor('content') ; //创建一个fckeditor对象,表单的名称为content 
$oFCKeditor->BasePath=”../fckeditor/”; //编辑器所在目录 
$oFCKeditor->ToolbarSet=”Yiyunnet”; // 默认编辑器工具栏有Basic(基本工具) Default(所有工具)Soft(分一栏可以插入图片视频 ) Renpeng (可以上传图片视频分为两栏 ) Full (三栏) 
$oFCKeditor->Height='100%'; //高度 
$oFCKeditor->Width='100%'; //宽度 
$oFCKeditor->Value=”"; //初始值 还可设置以下部分(”=”包含部分),并非必须: 
$oFCKeditor->Config['SkinPath'] = ‘../editor/skins/silver/'; // 设置编辑器皮肤共有三种皮肤default 
$oFCKeditor->Create(); //在要显示编缉器的地方输出变量$myeditor的值就行了 
?>

FCKeditor js调用方法一

<script src=”fckeditor/fckeditor.js”></script> 
<script type=”text/javascript”> 
var oFCKeditor = new FCKeditor( ‘Content' ) ; 
oFCKeditor.BasePath = ‘fckeditor/' ; 
oFCKeditor.ToolbarSet = ‘Basic' ; 
oFCKeditor.Width = ‘100%' ; 
oFCKeditor.Height = ‘400′ ; 
oFCKeditor.Value = ” ; 
oFCKeditor.Create() ; 
</script>

FCKeditor js调用方法二
<script src=”fckeditor/fckeditor.js”></script> 
<script type=”text/javascript”> 
function showFCK(){ 
var oFCKeditor = new FCKeditor('Content') ; 
oFCKeditor.BasePath = ‘fckeditor/' ; 
oFCKeditor.ToolbarSet = ‘Basic' ; 
oFCKeditor.Width = ‘100%' ; 
oFCKeditor.Height = ‘200′ ; 
oFCKeditor.Value = ” ; 
oFCKeditor.ReplaceTextarea() ; 
document.getElementByIdx(”btnShow”).disabled = ‘true'; 
document.getElementByIdx(”btnShow”).style.display = ‘none'; 
} 
</script> 
<textarea name=”Content”></textarea> 
<input id=btnShow style=”display:inline” type=button onclick=”showFCK()”>
PHP 相关文章推荐
PHP生成UTF8文件的方法
May 15 PHP
php读取文件内容的几种方法详解
Jun 26 PHP
PHP调用MsSQL Server 2012存储过程获取多结果集(包含output参数)的详解
Jul 03 PHP
php中的动态调用实例分析
Jan 07 PHP
php在apache环境下实现gzip配置方法
Apr 02 PHP
php基础设计模式大全(注册树模式、工厂模式、单列模式)
Aug 31 PHP
再谈PHP中单双引号的区别详解
Jun 12 PHP
php+ajax登录跳转登录实现思路
Jul 31 PHP
Yii2实现跨mysql数据库关联查询排序功能代码
Feb 10 PHP
Laravel学习教程之本地化模块
Aug 18 PHP
thinkphp框架实现路由重定义简化url访问地址的方法分析
Apr 04 PHP
PHP判断是否是json字符串
Apr 01 PHP
PHP如何抛出异常处理错误
Mar 02 #PHP
php中实现记住密码自动登录的代码
Mar 02 #PHP
防止用户利用PHP代码DOS造成用光网络带宽
Mar 01 #PHP
php Smarty 字符比较代码
Feb 27 #PHP
php下批量挂马和批量清马代码
Feb 27 #PHP
php SQL Injection with MySQL
Feb 27 #PHP
PHP的SQL注入实现(测试代码安全不错)
Feb 27 #PHP
You might like
Discuz!5的PHP代码高亮显示插件(黑暗中的舞者更新)
2007/01/29 PHP
PHP循环遍历数组的3种方法list()、each()和while总结
2014/11/19 PHP
Laravel中日期时间处理包Carbon的简单使用
2017/09/21 PHP
php+mysql+ajax 局部刷新点赞/取消点赞功能(每个账号只点赞一次)
2020/07/24 PHP
JS动画效果代码3
2008/04/03 Javascript
如何确保JavaScript的执行顺序 之jQuery.html并非万能钥匙
2011/03/03 Javascript
js判断一个元素是否为另一个元素的子元素的代码
2012/03/21 Javascript
基于jquery实现后台左侧菜单点击上下滑动显示
2013/04/11 Javascript
js单例模式的两种方案
2013/10/22 Javascript
jQuery打印图片pdf、txt示例代码
2014/07/22 Javascript
JavaScript中实现最高效的数组乱序方法
2014/10/11 Javascript
iframe里面的元素触发父窗口元素事件的jquery代码
2014/10/19 Javascript
node.js中的fs.lstat方法使用说明
2014/12/16 Javascript
Java File类的常用方法总结
2015/03/18 Javascript
解决JavaScript数字精度丢失问题的方法
2015/12/03 Javascript
js变量提升深入理解
2016/09/16 Javascript
原生的强大DOM选择器querySelector介绍
2016/12/21 Javascript
Angular4学习笔记router的简单使用
2018/03/30 Javascript
Jquery的autocomplete插件用法及参数讲解
2019/03/12 jQuery
vue props对象validator自定义函数实例
2019/11/13 Javascript
Postman如何实现参数化执行及断言处理
2020/07/28 Javascript
微信小程序对图片进行canvas压缩的方法示例详解
2020/11/12 Javascript
JavaScript实现切换多张图片
2021/01/27 Javascript
Python中对列表排序实例
2015/01/04 Python
python实现爬取千万淘宝商品的方法
2015/06/30 Python
Python中的FTP通信模块ftplib的用法整理
2016/07/08 Python
详解Python最长公共子串和最长公共子序列的实现
2018/07/07 Python
TensorFlow 合并/连接数组的方法
2018/07/27 Python
手把手教你从PyCharm安装到激活(最新激活码),亲测有效可激活至2089年
2020/11/25 Python
pymongo insert_many 批量插入的实例
2020/12/05 Python
利用CSS3实现进度条的两种姿势详解
2017/03/21 HTML / CSS
网络维护中文求职信
2014/01/03 职场文书
省级青年文明号申报材料
2014/05/23 职场文书
人力资源职位说明书
2014/07/29 职场文书
关于青春的演讲稿三分钟
2014/08/22 职场文书
Python函数对象与闭包函数
2022/04/13 Python