性夜影院爽黄a爽免费视_一级特黄aaa大片在_一级做a爰片久久毛片免费_奇米精品一区二区三区在线观看 - jizz国产

如何在編輯商品和商品添加頁面使用多個編輯器

創建時間:2019-11-26 16:01發布者:海譽_荷蘭豆點擊數:2671
由于業務需要,要在編輯商品界面和商品添加頁面使用多個編輯器,需要怎么做呢?
回答 我也遇到這個問題(11)
二次開發,模板制作2019-12-02 03:01回答
論壇編輯器不好用,請查看這個文章解決:
http://0533hf.com/post/124
有用(0) 沒用(0)
海譽_荷蘭豆2019-12-21 11:54回答
問題解決,順帶解決官方外置上傳圖片插件:
/admin/template/product.html,表單
<dl>
<dt valign="top">{$lang.article_content}</dt>
<dd>
<!-- TinyMCE -->
<script type="text/javascript">init_editer('secontent', '{$cur}', '{$article.id}')</script>
<textarea id="secontent" name="secontent" rows="20">{$article.secontent}</textarea>
<!-- /TinyMCE -->
</dd>
</dl>


/admin/include/tinymce/init.js,添加函數:
function init_editer(selecter = 'content', module, item_id = ''){
console.log(item_id);
tinymce.init({
selector:'textarea#' + selecter,
language:'zh_CN',
width:'800px',
height:'360px',
menubar:false,
skin:'simple',
theme:'simple',
convert_urls :false,
automatic_uploads: false,
images_upload_url: 'file.php?rec=mce&module=' + module + '&item_id=' + item_id + '&type=' + selecter,
plugins: [
'autolink lists link charmap textcolor',
'code hr pagebreak map textpattern image imagetools',
'media table help wordcount fullscreen image'
],
toolbar: 'fontsizeselect bold italic strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify outdent indent numlist bullist code | link unlink image media map charmap table hr removeformat undo redo help fullscreen'
});
}

/admin/file.php,添加文件上傳的代碼就可以了

elseif ($rec == 'mce') {
// hidden code , need contact qq:67052796
echo json_encode($html);
}
有用(0) 沒用(0)
海譽_荷蘭豆2019-12-22 08:28回答
完整代碼:http://www.hzhaiyu.net/news/company-news/11.html
有用(0) 沒用(0)