Phoenix001
妙语书生 Lv5
UID 181234
精华
2
积分 13
帖子 1490
金币 3003 块
阅读权限 10
注册 2019-5-27
状态 离线
|
D4所见即所得编辑器测试版
在研究过Molyx后,发现移植过来还有很多的问题,为了方便大家的安装,所以dream还是使用了原来梦网的tinyMCE编辑器,在这基础上进行了简化。
实现单个论坛使用所见即所得编辑器
所谓测试版,是希望大家对该编辑器在打开HTMl功能后的安全性方面提出测试,在D25中安装了过滤器后没有问题,在D4中,在不安装过滤器的情况下,希望大家把安全测试结果一起分享
安装过程简单:
1.打开post_newthread.htm模版
找到
{template header}
复制代码
后面添加
<!--{if $forum['allowhtml']}-->
<script language="javascript" type="text/javascript" src="editor/tiny_mce_gzip.php"></script>
<script language="javascript" type="text/javascript">
var theme_expand_buttons = [['emule', 'editor/images/emule.gif', '插入电驴标签', 'insertcode'],['rm', 'editor/images/real.gif', '插入real标签', 'insertcode'],['quote', 'editor/images/quote.gif', '插入引用代码', 'insertcode']];
tinyMCE.init({
theme : "advanced",
mode : "exact",
elements : "message",
relative_urls : false,
theme_expand_buttons2_add : "emule,rm,quote",
plugins : "emotions,table,flash",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,emotions,,flash,insertdate,separator,forecolor,backcolor,tablecontrols",
theme_advanced_buttons3_add_before : "",
theme_advanced_disable : "anchor,undo,redo,separator,",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
force_br_newlines :true,
force_p_newlines : false,
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left"
});
</script>
<!--{/if}-->
复制代码
2.找到
{template post_bbinsert}
复制代码
改为
<!--{if !$forum['allowhtml']}-->
{template post_bbinsert}
<!--{/if}-->
复制代码
3.找到
{template post_sminsert}
复制代码
改为
<!--{if !$forum['allowhtml']}-->
{template post_sminsert}<!--{/if}-->
复制代码
4.打开post_editpost.htm模版做相同修改即可
5.解压editor.rar文件放到论坛根目录
6.后台对单独论坛打开HTML
图片附件:
1.JPG (2023-2-17 18:00, 61.32 K)
图片附件:
2.JPG (2023-2-17 18:00, 51.61 K)
附件:
editor.rar (2023-2-17 18:00, 458.97 K)
该附件被下载次数 0
|
|