ecshop中fckeditor添加方法

create_html_editor()函數在includes文件夾下lib_main.php文件中:
  (更多的信息可以去我的私人博客:沒有船的海賊 www.hanluner.com)

  1. /** 
  2.  * 生成編輯器 
  3.  * @param   string  input_name  輸入框名稱 
  4.  * @param   string  input_value 輸入框值 
  5.  */ 
  6. function create_html_editor($input_name$input_value = ''
  7.     global $smarty
  8.  
  9.     $editor = new FCKeditor($input_name); 
  10.     $editor->BasePath   = '../includes/fckeditor/'
  11.     $editor->ToolbarSet = 'Normal'
  12.     $editor->Width      = '100%'
  13.     $editor->Height     = '320'
  14.     $editor->Value      = $input_value
  15.     $FCKeditor = $editor->CreateHtml(); 
  16.     $smarty->assign('FCKeditor'$FCKeditor); 

goods.php文件中範例:

  1. include_once(ROOT_PATH . 'includes/fckeditor/fckeditor.php'); // 包含 html editor 類文件 


  /* 創建 html editor */
  create_html_editor('goods_desc', $goods['goods_desc']);

目標文件中添加:
  {$FCKeditor}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章