PHP中使用FCKeditor2.3.2配置

逝月留影

逝月留影

2016-01-29 12:53

PHP中使用FCKeditor2.3.2配置,PHP中使用FCKeditor2.3.2配置
 

下载FCKeditor2.3.2,解压至FCKeditor。

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/php/)

1.首先删除不必要的文件节省空间。凡是以_开头的文件如_samples,_testcases和一些用不到的.asp、.jsp、.cfm文件统统干掉。

2.修改fckconfig.js
FCKConfig.AutoDetectLanguage = true ;//是否自动检测语言
FCKConfig.DefaultLanguage  = 'zh-cn' ;//设置语言
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;//设置皮肤
FCKConfig.TabSpaces = 1 ;//tab是否有效
FCKConfig.ToolbarStartExpanded = true ;//编辑工具条是否出现,等点“展开工具栏”时才出现
FCKConfig.FontNames  = '宋体;黑体;隶书;楷体_GB2312;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;//添加中文字体
 
3.修改FCKeditoreditorcssfck_editorarea.css
设置默认字体及大小
body, td
{
 font-family: Arial, Verdana, Sans-Serif;
 font-size: 14px;
}

4.关于文件上传的设置
 
修改fckconfig.js
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/php/)

修改fckeditoreditorfilemanagerbrowserdefaultconnectorsphp
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//设置上传的文件夹,可自己指定
 
修改fckeditoreditorfilemanageruploadphp
$Config['Enabled'] = true ;
$Config['UseFileType'] = true ;
$Config['UserFilesPath'] = '/UserFiles/' ;//同上要一样
 
5.引入在线编辑器时只需
<?php
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor-BasePath = 'fckeditor/';//这个路径一定要和上面那个引入路径一致,否则会报错:找不到fckeditor.html页面
//$oFCKeditor-Value = '' ;
$oFCKeditor-Width = '100%' ;
$oFCKeditor-Height = '300' ;
$oFCKeditor-Create() ;
?
 
JS用alert( FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true ))得到FCKeditor1的值;
PHP用$_POST['FCKeditor1']得到FCKeditor1的值。

展开更多 50%)
分享

猜你喜欢

PHP中使用FCKeditor2.3.2配置

PHP
PHP中使用FCKeditor2.3.2配置

在jsp环境中配置使用fckeditor

Web开发
在jsp环境中配置使用fckeditor

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

JSP 页面中使用FCKeditor控件(js用法)

Web开发
JSP 页面中使用FCKeditor控件(js用法)

在PHP中使用XML

PHP
在PHP中使用XML

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

在JSP环境中如何配置和使用fckeditor

Web开发
在JSP环境中如何配置和使用fckeditor

教你在JSP环境中配置和使用fckeditor

Web开发
教你在JSP环境中配置和使用fckeditor

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

《神雕侠侣》攻略之御前科举任务心得分享

《神雕侠侣》攻略之御前科举任务心得分享

Hibernate获得成功的十大理由

Hibernate获得成功的十大理由
下拉加载更多内容 ↓