数码资讯
对CI框架集成CKEditor编辑器教程
1。将FCKeditor目录ci_path /系统/插件/ 2、加入ci_path /系统/应用/配置/ config.php: $config{'fckeditor_basepath'} = /system/plugins/fckeditor/; { } = 'fckeditor_toolbars
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
1。将FCKeditor目录ci_path /系统/插件/
2、加入ci_path /系统/应用/配置/ config.php:
$config{'fckeditor_basepath'} = /system/plugins/fckeditor/;
{ } = 'fckeditor_toolbarset_default美元配置的'default;
三.创建帮助建立一个新的form_helper.php / / /辅助系统的应用
复制代码代码如下所示:
< PHP
如果(!定义('basepath '))退出(不直接访问允许脚本);
include_once(修改表情。 / / form_helper帮手。EXT);
功能form_fckeditor($data = '',价值=,=额外美元)
{
CI = get_instance(美元);
fckeditor_basepath美元=美元CI ->配置->项目('fckeditor_basepath);
require_once($ _server {document_root}。fckeditor_basepath美元。'fckeditor PHP);
$ instanceName =(is_array($data)isset($数据{ 'name' }))$数据{ 'name' }:$数据;
$ FCKeditor =新FCKeditor($ instancename);
如果($ FCKeditor ->兼容())
{
FCKeditor美元->价值= html_entity_decode(价值);
FCKeditor美元->修改表情= $ fckeditor_basepath;
如果($ fckeditor_toolbarset =美元CI ->配置->项目('fckeditor_toolbarset_default '))
FCKeditor美元->工具条集= $ fckeditor_toolbarset;
如果(is_array($数据))
{
如果(isset(美元币值的数据{ }))
FCKeditor美元->价值= html_entity_decode(美元币值的数据{ });
如果(isset($数据{ 'basepath ' }))
FCKeditor美元->修改表情= $数据'basepath'} {;
如果(isset($数据{ 'toolbarset ' }))
FCKeditor美元->工具条集= $数据'toolbarset'} {;
如果(isset($数据{ 'width ' }))
FCKeditor美元->宽度= $数据'width'} {;
如果(isset($数据{ 'height ' }))
FCKeditor美元->高度= $数据'height'} {;
}
返回的FCKeditor -> CreateHtml();
}
其他的
{
返回form_textarea(美元的数据,美元价值,美元的额外);
}
}
>
4。在项目中使用FCKeditor
复制代码代码如下所示:
< PHP
美元->荷载->帮手('form_helper);
数据=数组(
名字= > 'newscontent,
ID = > 'newscontent,
/ / 'toolbarset= > 'advanced,
修改表情=美元->配置->项目('fckeditor_basepath),
宽度= > 80 %,
高度= > '200
);
回声form_fckeditor($数据);
>
2、加入ci_path /系统/应用/配置/ config.php:
$config{'fckeditor_basepath'} = /system/plugins/fckeditor/;
{ } = 'fckeditor_toolbarset_default美元配置的'default;
三.创建帮助建立一个新的form_helper.php / / /辅助系统的应用
复制代码代码如下所示:
< PHP
如果(!定义('basepath '))退出(不直接访问允许脚本);
include_once(修改表情。 / / form_helper帮手。EXT);
功能form_fckeditor($data = '',价值=,=额外美元)
{
CI = get_instance(美元);
fckeditor_basepath美元=美元CI ->配置->项目('fckeditor_basepath);
require_once($ _server {document_root}。fckeditor_basepath美元。'fckeditor PHP);
$ instanceName =(is_array($data)isset($数据{ 'name' }))$数据{ 'name' }:$数据;
$ FCKeditor =新FCKeditor($ instancename);
如果($ FCKeditor ->兼容())
{
FCKeditor美元->价值= html_entity_decode(价值);
FCKeditor美元->修改表情= $ fckeditor_basepath;
如果($ fckeditor_toolbarset =美元CI ->配置->项目('fckeditor_toolbarset_default '))
FCKeditor美元->工具条集= $ fckeditor_toolbarset;
如果(is_array($数据))
{
如果(isset(美元币值的数据{ }))
FCKeditor美元->价值= html_entity_decode(美元币值的数据{ });
如果(isset($数据{ 'basepath ' }))
FCKeditor美元->修改表情= $数据'basepath'} {;
如果(isset($数据{ 'toolbarset ' }))
FCKeditor美元->工具条集= $数据'toolbarset'} {;
如果(isset($数据{ 'width ' }))
FCKeditor美元->宽度= $数据'width'} {;
如果(isset($数据{ 'height ' }))
FCKeditor美元->高度= $数据'height'} {;
}
返回的FCKeditor -> CreateHtml();
}
其他的
{
返回form_textarea(美元的数据,美元价值,美元的额外);
}
}
>
4。在项目中使用FCKeditor
复制代码代码如下所示:
< PHP
美元->荷载->帮手('form_helper);
数据=数组(
名字= > 'newscontent,
ID = > 'newscontent,
/ / 'toolbarset= > 'advanced,
修改表情=美元->配置->项目('fckeditor_basepath),
宽度= > 80 %,
高度= > '200
);
回声form_fckeditor($数据);
>
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。