天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

CI框架中集成CKEditor編輯器的教程

1、將fckeditor目錄置入CI_PATH/system/plugins/

2、在CI_PATH/system/application/config/config.php中加入:

$config['fckeditor_basepath'] = "/system/plugins/fckeditor/";
$config['fckeditor_toolbarset_default'] = 'Default';

3、創(chuàng)建helper,在/system/application/helpers新建form_helper.php

復(fù)制代碼 代碼如下:
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
include_once( BASEPATH . '/helpers/form_helper'.EXT);
function form_fckeditor($data = '', $value = '', $extra = '')
{
     $CI =& get_instance();
    $fckeditor_basepath = $CI->config->item('fckeditor_basepath');
     require_once( $_SERVER["DOCUMENT_ROOT"] . $fckeditor_basepath. 'fckeditor.php' );
    $instanceName = ( is_array($data) && isset($data['name'])   ) ? $data['name'] : $data;
    $fckeditor = new FCKeditor($instanceName);
     if( $fckeditor->IsCompatible() )
    {
         $fckeditor->Value = html_entity_decode($value);
        $fckeditor->BasePath = $fckeditor_basepath;
         if( $fckeditor_toolbarset = $CI->config->item('fckeditor_toolbarset_default'))
                $fckeditor->ToolbarSet = $fckeditor_toolbarset;
         if( is_array($data) )
        {
            if( isset($data['value']) )
                $fckeditor->Value = html_entity_decode($data['value']);
             if( isset($data['basepath']) )
                $fckeditor->BasePath = $data['basepath'];
             if( isset($data['toolbarset']) )
                $fckeditor->ToolbarSet = $data['toolbarset'];
             if( isset($data['width']) )
                $fckeditor->Width = $data['width'];
             if( isset($data['height']) )
                $fckeditor->Height = $data['height'];
        }
        return $fckeditor->CreateHtml();
    }
    else
    {
        return form_textarea( $data, $value, $extra );
    }
}
?>

4、在項目中使用fckeditor

復(fù)制代碼 代碼如下:
<?php
$this->load->helper('form_helper');
$data = array(
    'name'        => 'newsContent',
    'id'          => 'newsContent',
    //'toolbarset'  => 'Advanced',
    'basepath'    => $this->config->item('fckeditor_basepath'),
    'width'       => '80%',
    'height'      => '200'
);
echo form_fckeditor( $data );
?>

php技術(shù)CI框架中集成CKEditor編輯器的教程,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 成年免费大片黄在线观看岛国 | 亚洲国产欧美在线看片 | 亚洲国产在线视频精品 | 成片免费观看视频大全 | 99久久国产综合精品网成人影院 | 亚洲欧美日韩国产另类电影 | 玩两个少妇女邻居 | 男人的天堂MV在线视频免费观看 | 手机毛片免费看 | xxx日本hd| 亚洲日韩中文字幕日本有码 | 青柠在线观看免费高清电视剧荣耀 | 日本在线高清不卡免费播放 | 两个客户一起吃我的奶 | 麻豆成人久久精品二区三区网站 | 亚洲日韩中文字幕日本有码 | 最近免费中文字幕大全免费 | 偷偷鲁手机在线播放AV | 一级毛片皇帝 宫女 | 无码任你躁久久久久久老妇双奶 | 一个人在线观看免费高清视频 | 日本一本在线播放 | 伊在香蕉国产在线视频 | 欧美成人国产 | 97超碰免费人妻中文 | 成人亚洲乱码在线 | 日本真人啪啪试看30秒 | 久久99蜜桃精品麻豆 | 国产人人为我我为人人澡 | 亚洲精品拍拍央视网出文 | 国产成人自拍视频在线观看 | 芳草地在线观看免费观看 | 免费观看桶机十分钟 | 精品视频一区二区三三区四区 | 亚洲 日韩 在线 国产 视频 | 99热精品在线视频观看 | 99热久久精品国产一区二区 | 国产第一页浮力影院 | 久久精品国产亚洲AV麻豆欧美玲 | 野花高清在线观看免费3中文 | 跪趴式啪啪GIF动态图27报 |