当前位置: 首页>>代码示例>>PHP>>正文


PHP FCKeditor::Create方法代码示例

本文整理汇总了PHP中FCKeditor::Create方法的典型用法代码示例。如果您正苦于以下问题:PHP FCKeditor::Create方法的具体用法?PHP FCKeditor::Create怎么用?PHP FCKeditor::Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FCKeditor的用法示例。


在下文中一共展示了FCKeditor::Create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cmsEditor

 public function cmsEditor($name, $value, $options = null, $width = '100%', $height = '350')
 {
     //1. Nhung tap tin fckeditor vao file chay
     require_once SCRIPTS_PATH . "/fckeditor/fckeditor_php5.php";
     //2. Khai bao duong dan URL den thu muc fckeditor
     $sBasePath = SRCIPTS_URL . '/fckeditor/';
     //3. Khoi tao doi tuong FCKeditor
     $oFCKeditor = new FCKeditor($name);
     //4. Thiet lap duong den cho thuong BasePath
     $oFCKeditor->BasePath = $sBasePath;
     //Dua gia tri vao Editor
     $oFCKeditor->Value = $value;
     //Thay doi kich thuoc cua Editor
     $oFCKeditor->Width = $width;
     $oFCKeditor->Height = $height;
     if (!isset($options['toolbar'])) {
         $oFCKeditor->ToolbarSet = 'Default';
     } else {
         $oFCKeditor->ToolbarSet = $options['toolbar'];
     }
     if (!isset($options['language'])) {
         $oFCKeditor->Config['AutoDetectLanguage'] = false;
         $oFCKeditor->Config['DefaultLanguage'] = 'en';
     } else {
         $oFCKeditor->Config['AutoDetectLanguage'] = false;
         $oFCKeditor->Config['DefaultLanguage'] = $options['language'];
     }
     //5. Tao FCKeditor
     return $oFCKeditor->Create();
 }
开发者ID:brianbui171,项目名称:website_zend_1.11,代码行数:30,代码来源:CmsEditor.php

示例2: while

 function get_edit_page()
 {
     $list = "";
     if ($this->session->justloggedin == 1) {
         $query = "select id, content from mdl_about where id=1";
         $result = $this->db->query($query);
         while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
             $content = $row['content'];
         }
         $list = $list . "<table class='table table-hover' border='0'>";
         $list = $list . "<tr>";
         $oFCKeditor = new FCKeditor('editor');
         $oFCKeditor->BasePath = $this->editor_path;
         $oFCKeditor->Value = $content;
         $editor = $oFCKeditor->Create(false);
         $list = $list . "</td >&nbsp;&nbsp;{$editor}</td>";
         $list = $list . "</tr>";
         $list = $list . "<tr>";
         $list = $list . "<td align='left' style='padding-left:0px'><button type='button' id='save_about' class='btn btn-primary' style='spacing-left:0px;'>Save</button></td>";
         $list = $list . "</tr>";
         $list = $list . "</table>";
     } else {
         $list .= "<p>You are not authenticated. &nbsp; <a href='https://medical2.com/login'><button class='btn btn-primary' id='relogin'>Login</button></a></p>";
     }
     return $list;
 }
开发者ID:sirromas,项目名称:medical,代码行数:26,代码来源:About.php

示例3: FCKEditor

 /**
  * Get the current user
  *
  * @return  NovemberUser
  */
 public function FCKEditor($name, $value = '', $basePath = '')
 {
     $oFCKeditor = new FCKeditor($name);
     $oFCKeditor->BasePath = $basePath . '/';
     $oFCKeditor->Value = $value;
     $oFCKeditor->Create();
 }
开发者ID:nyeholt,项目名称:relapse,代码行数:12,代码来源:FCKEditor.php

示例4: SpGetEditor

function SpGetEditor($fname,$fvalue,$nheight="350",$etype="Basic",$gtype="print",$isfullpage="false")
{
	if(!isset($GLOBALS['cfg_html_editor'])) $GLOBALS['cfg_html_editor']='fck';
	if($gtype=="") $gtype = "print";
	if($GLOBALS['cfg_html_editor']=='fck'){
	  require_once(dirname(__FILE__)."/../FCKeditor/fckeditor.php");
	  $fck = new FCKeditor($fname);
	  $fck->BasePath		= $GLOBALS['cfg_cmspath'].'/include/FCKeditor/' ;
	  $fck->Width		= '100%' ;
	  $fck->Height		= $nheight ;
	  $fck->ToolbarSet	= $etype ;
	  $fck->Config['FullPage'] = $isfullpage;
	  if($GLOBALS['cfg_fck_xhtml']=='Y'){
	  	$fck->Config['EnableXHTML'] = 'true';
	    $fck->Config['EnableSourceXHTML'] = 'true';
	  }
	  $fck->Value = $fvalue ;
	  if($gtype=="print") $fck->Create();
	  else return $fck->CreateHtml();
  }else{
		require_once(dirname(__FILE__)."/../htmledit/dede_editor.php");
	  $ded = new DedeEditor($fname);
	  $ded->BasePath		= $GLOBALS['cfg_cmspath'].'/include/htmledit/' ;
	  $ded->Width		= '100%' ;
	  $ded->Height		= $nheight ;
	  $ded->ToolbarSet = strtolower($etype);
	  $ded->Value = $fvalue ;
	  if($gtype=="print") $ded->Create();
	  else return $ded->CreateHtml();
	}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:inc_fun_funAdmin.php

示例5: FckEditor

    /**
     * i know it is not well liked to output this here, but for integration purposes it makes sense
     */
    public function FckEditor($instance = 'content', $value = 'Enter text here', $height = 600, $width = 600, $fullToolbar = true)
    {
        $view = $this->view;
        include 'Digitalus/editor/fckeditor.php';
        ?>
        <script>
        function FCKeditor_OnComplete( editorInstance )
        {
        }
        </script>

        <?php 
        $sBasePath = '/scripts/fckeditor/';
        $oFCKeditor = new FCKeditor($instance);
        $oFCKeditor->BasePath = $sBasePath;
        $oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/office2003/';
        $oFCKeditor->Width = $width;
        $oFCKeditor->Height = $height;
        if ($fullToolbar) {
            $oFCKeditor->ToolbarSet = 'Digitalus';
        } else {
            $oFCKeditor->ToolbarSet = 'Basic';
        }
        $oFCKeditor->Value = $value;
        $oFCKeditor->Create();
    }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:29,代码来源:FckEditor.php

示例6: FCKeditor

 /**
  * Метод создания объекта FCKeditor
  *
  * @param string $val		значение поля ввода
  * @param int $height		высота поля ввода
  * @param string $name		наименование поля ввода
  * @param string $toolbar	панель управления
  * @return object			объект FCKeditor
  */
 function _newsletterFckObjectCreate($val, $height = 300, $name, $toolbar = 'Default')
 {
     $oFCKeditor = new FCKeditor($name);
     $oFCKeditor->Height = $height;
     $oFCKeditor->ToolbarSet = $toolbar;
     $oFCKeditor->Value = $val;
     $obj = $oFCKeditor->Create();
     return $obj;
 }
开发者ID:laiello,项目名称:avecms,代码行数:18,代码来源:class.newsletter.php

示例7: FCKeditor

 function render_editor()
 {
     include_once FCKeditor_DIR . 'fckeditor.php';
     $editor = new FCKeditor($this->_process_name_attribute($this->get_attribute('name')));
     $editor->BasePath = FCKeditor_BasePath;
     $editor->Value = $this->get_value();
     $editor->Width = $this->get_attribute('width');
     $editor->Height = $this->get_attribute('height');
     $editor->Create();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:fckeditor_component.class.php

示例8: getFckeditor

/**
 * 创建 FCKeditor 编辑器
 * @param $initInfo :初始化的值
 * @param $fckName :Fckeditor提交后的表单域名称
 * @param $width :Fckeditor编辑器的宽度
 * @param $height :Fckeditor编辑器的高度
 */
function getFckeditor($initInfo = '', $fckName = 'fckEditInfo', $width = '100%', $height = '600')
{
    include_once SITEWEB_PATH . "/fckeditor/fckeditor.php";
    $oFCKeditor = new FCKeditor($fckName);
    $oFCKeditor->BasePath = "fckeditor/";
    $oFCKeditor->Width = $width;
    $oFCKeditor->Height = $height;
    $oFCKeditor->Value = $initInfo;
    //默认的内容
    return $oFCKeditor->Create();
}
开发者ID:laiello,项目名称:quickbug,代码行数:18,代码来源:Function.inc.php

示例9: action_edit

 public function action_edit()
 {
     exit;
     include_once "ext/fckeditor/fckeditor.php";
     $oFCKeditor = new FCKeditor('FCKeditor2');
     $oFCKeditor->Height = 190;
     $oFCKeditor->BasePath = '/ext/fckeditor/';
     $oFCKeditor->Config['AutoDetectLanguage'] = false;
     $oFCKeditor->Config['DefaultLanguage'] = "ru";
     $oFCKeditor->Value = "";
     $oFCKeditor->Create();
 }
开发者ID:Romerohub,项目名称:Kohana-admin,代码行数:12,代码来源:main.php

示例10: TextBox

 public function TextBox($name, $value = "")
 {
     $sBasePath = join_path(Registry::get('base_dir'), 'system/editor/fckeditor/');
     $oFCKeditor = new \FCKeditor($name);
     $oFCKeditor->BasePath = $sBasePath;
     $oFCKeditor->Value = $value;
     $oFCKeditor->Width = 800;
     $oFCKeditor->Height = 700;
     ob_start();
     $oFCKeditor->Create();
     unset($oFCKeditor);
     return ob_get_clean();
 }
开发者ID:hemantshekhawat,项目名称:Snippets,代码行数:13,代码来源:editor.php

示例11: fckeditor

 /**
  * creates an fckeditor textarea
  * 
  * @param array $namepair - used to build textarea name for views, array('Model', 'fieldname')
  * @param stirng $basepath - base path of project/system
  * @param string $content
  */
 public function fckeditor($namepair = array(), $basepath = '', $content = '', $width = '100%', $height = '200')
 {
     $editor_name = 'data';
     foreach ($namepair as $name) {
         $editor_name .= "[" . $name . "]";
     }
     $oFCKeditor = new FCKeditor($editor_name);
     $oFCKeditor->BasePath = $basepath . '/js/fckeditor/';
     $oFCKeditor->Value = $content;
     ///code by praveen
     $oFCKeditor->Height = $height;
     $oFCKeditor->Width = $width;
     $oFCKeditor->Create();
 }
开发者ID:spsinghdocument,项目名称:snr-infoom,代码行数:21,代码来源:FckHelper.php

示例12: smarty_function_editor

/**
* Smarty function plugin
* Requires PHP >= 4.3.0
* -------------------------------------------------------------
* Type:     function
* Name:     fckeditor
* Version:  1.1
* Author:   gazoot (gazoot care of gmail dot com)
* Purpose:  Creates a FCKeditor, a very powerful textarea replacement.
* -------------------------------------------------------------
* @param InstanceName Editor instance name (form field name)
* @param BasePath optional Path to the FCKeditor directory. Need only be set once on page. Default: /js/fckeditor/
* @param Value optional data that control will start with, default is taken from the javascript file
* @param Width optional width (css units)
* @param Height optional height (css units)
* @param ToolbarSet optional what toolbar to use from configuration
* @param CheckBrowser optional check the browser compatibility when rendering the editor
* @param DisplayErrors optional show error messages on errors while rendering the editor
*
* Default values for optional parameters (except BasePath) are taken from fckeditor.js.
*
* All other parameters used in the function will be put into the configuration section,
* CustomConfigurationsPath is useful for example.
* See http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options for more configuration info.
*/
function smarty_function_editor($params, &$smarty)
{
    $params["BasePath"] = script_path . "/fckeditor";
    if (!isset($params['InstanceName']) || empty($params['InstanceName'])) {
        $smarty->trigger_error('fckeditor: required parameter "InstanceName" missing');
    }
    static $base_arguments = array();
    static $config_arguments = array();
    // Test if editor has been loaded before
    $init = count($base_arguments) == 0;
    // BasePath must be specified once.
    if (isset($params['BasePath'])) {
        $base_arguments['BasePath'] = $params['BasePath'];
    } else {
        if (empty($base_arguments['BasePath'])) {
            $base_arguments['BasePath'] = '/js/fckeditor/';
        }
    }
    $base_arguments['InstanceName'] = $params['InstanceName'];
    if (isset($params['Value'])) {
        $base_arguments['Value'] = $params['Value'];
    } else {
        $base_arguments['Value'] = '';
    }
    if (isset($params['Width'])) {
        $base_arguments['Width'] = $params['Width'];
    }
    if (isset($params['Height'])) {
        $base_arguments['Height'] = $params['Height'];
    }
    if (isset($params['ToolbarSet'])) {
        $base_arguments['ToolbarSet'] = $params['ToolbarSet'];
    }
    if (isset($params['CheckBrowser'])) {
        $base_arguments['CheckBrowser'] = $params['CheckBrowser'];
    }
    if (isset($params['DisplayErrors'])) {
        $base_arguments['DisplayErrors'] = $params['DisplayErrors'];
    }
    // Use all other parameters for the config array (replace if needed)
    $other_arguments = array_diff_assoc($params, $base_arguments);
    $config_arguments = array_merge($config_arguments, $other_arguments);
    require_once $base_arguments["BasePath"] . "/fckeditor.php";
    $oFCKeditor = new FCKeditor($base_arguments["InstanceName"]);
    $oFCKeditor->BasePath = script_url . "/fckeditor/";
    $oFCKeditor->ToolbarSet = "Basic";
    return $oFCKeditor->Create();
}
开发者ID:hasanozgan,项目名称:kissabe,代码行数:73,代码来源:function.editor.php

示例13: load

 function load($field, $width = 400)
 {
     $field = explode('.', $field);
     if (empty($field[1])) {
         // need to know how to call a model from a helper
     } else {
         $model = $field[0];
         $controller = $field[1];
     }
     //require_once (WWW_ROOT.'js'.DS.'fck'.DS.'fckeditor.php');
     App::import('Vendor', 'fckeditor');
     $oFCKeditor = new FCKeditor('data[' . $model . '][' . $controller . ']');
     $oFCKeditor->BasePath = Configure::read('path') . 'js/fck/';
     $oFCKeditor->Value = $this->data[$model][$controller];
     $oFCKeditor->Height = $width;
     $oFCKeditor->Create();
 }
开发者ID:kondrat,项目名称:horpol,代码行数:17,代码来源:fck.php

示例14: smarty_function_fckeditor

function smarty_function_fckeditor($params, &$smarty)
{
    require_once SITE_DIR . 'classes/FCKeditor.class.php';
    #print_r($params);
    foreach ($params as $_key => $_value) {
        switch ($_key) {
            case 'source':
                ${$_key} = $_value;
                break;
            case 'toolbar':
                ${$_key} = $_value;
                break;
            case 'name':
                ${$_key} = $_value;
                break;
            case 'width':
                ${$_key} = $_value;
                break;
            case 'height':
                ${$_key} = $_value;
                break;
        }
    }
    $output = '';
    if (!isset($name)) {
        $name = 'fckContent';
    }
    $oFCKeditor = new FCKeditor($name);
    if (isset($height)) {
        $oFCKeditor->Height = $height;
    }
    if (isset($width)) {
        $oFCKeditor->Width = $width;
    }
    if (!isset($toolbar)) {
        $oFCKeditor->ToolbarSet = 'Default';
    } else {
        $oFCKeditor->ToolbarSet = $toolbar;
    }
    $oFCKeditor->Value = $source;
    $output .= $oFCKeditor->Create(true);
    return $output;
}
开发者ID:roman-reva,项目名称:iec,代码行数:43,代码来源:function.fckeditor.php

示例15: editeur

 public function editeur($name, $value = '', $height = '500px', $width = '100%')
 {
     require_once 'js/fckeditor/fckeditor.php';
     $oFCKeditor = new FCKeditor($name);
     $oFCKeditor->BasePath = url::base() . 'js/fckeditor/';
     $oFCKeditor->Value = $value;
     $oFCKeditor->Config['EnterMode'] = 'br';
     $oFCKeditor->Config['AutoDetectLanguage'] = false;
     $oFCKeditor->Config['DefaultLanguage'] = 'fr';
     $oFCKeditor->Config["UserFilesAbsolutePath"] = url::base() . 'images/';
     $oFCKeditor->Config["UserFilesPath"] = url::base() . 'images/';
     $oFCKeditor->Config["SkinPath"] = $oFCKeditor->BasePath . 'editor/skins/default/';
     $oFCKeditor->SmileyPath = $oFCKeditor->BasePath . 'editor/images/smiley/msn/';
     $oFCKeditor->Height = $height;
     $oFCKeditor->Width = $width;
     $oFCKeditor->FormatOutput = true;
     $oFCKeditor->FormatSource = true;
     $oFCKeditor->Create();
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:19,代码来源:Fck.php


注:本文中的FCKeditor::Create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。