因爲ecshop原版fckeditor編輯器過於陳舊,就有想法要更新編輯器,最開始想到的是ueditor,可是最後沒法獲取編輯器內的值,最後放棄.而後就轉至kindeditor.php
方法也是在網上搜索到的,並測試正常.可是最後就找不到原做者是誰.html
具體的步驟以下:asp.net
1.下載kindeditor.jsp
2.解壓到includes文件夾下.編輯器
3.刪除無用文件夾.asp/asp.net/jsp/examples 測試
4.admin\goods.php 416行左右 spa
create_html_editor('goods_desc', $goods['goods_desc']);
這個調用方法註釋. 加入 .net
$FCKeditor = create_html_kindeditor('goods_desc', $goods['goods_desc'], 'theForm'); $smarty->assign('FCKeditor', $FCKeditor);
5.admin\includes\lib_main.phpcode
加入orm
function create_html_kindeditor($input_name, $input_value = '', $form_name = '') { global $smarty; $kindeditor="<script charset='utf-8' src='../includes/kindeditor/kindeditor-min.js'></script> <script> var editor; KindEditor.ready(function(K) { editor = K.create('textarea[name=\"$input_name\"]', { allowFileManager : true, width : '700px', height: '300px', resizeType: 0 //固定寬高 }); }); </script> <textarea id=\"$input_name\" name=\"$input_name\" style='width:700px;height:300px;'>$input_value</textarea> "; return $kindeditor; }
6.admin\templates\good_info.htm
大約429行 提交按鈕 type更換才submit
7.大功告成