edit-commentform.js 原是在利用 editcomments 這個外掛來對迴響做一些修改用途,但經過阿欣老師的作法而衍生出來的發想,後來也證明了確實可用。但在新版裡,有些利用tinymce編輯器使用的工具列竟然沒出現插入檔案/資料夾的圖示,於是參照tinymce裡的tiny_mce-plog.js進行修改。
維謙老師製作的原檔:
tinyMCE.init({
mode : "textareas",
theme : "advanced",
relative_urls : false,
plugins : "inlinepopups,insertdatetime,emotions,paste",
theme_advanced_buttons1: "fontsizeselect,forecolor,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,pastetext,|,undo,redo",
theme_advanced_buttons2: "bullist,numlist,|,blockquote,|,link,unlink,image,insertresource,emotions,|,hr,insertdate,inserttime,code",
theme_advanced_buttons3 : "",
language : "tw",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
apply_source_formatting : true,
force_p_newlines : true,
force_br_newlines : false
})
我修改後的檔案如下:
tinymce_plugins="style,table,more,advhr,advimage,advlink,advlist,emotions,inlinepopups,insertdatetime,searchreplace,paste,print,fullscreen,nonbreaking,wordcount,autosave,insertaudio,insertresource,insertvideo,media,embed";
tinyMCE.init({
mode : "textareas",
theme : "advanced",
relative_urls : false,
plugins : tinymce_plugins,
theme_advanced_buttons1: "fontsizeselect,forecolor,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,pastetext,|,undo,redo",
theme_advanced_buttons2: "bullist,numlist,|,blockquote,|,link,unlink,image,insertresource,emotions,|,hr,insertdate,inserttime,code",
theme_advanced_buttons3 : "",
language : "tw",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
apply_source_formatting : true,
force_p_newlines : true,
force_br_newlines : false
})
差別僅在於:將 tinymce_plugins 設為參數,並指定外掛,然後在 init 裡,將那行 plugins 指向該參數,其他照舊。
再經過幾次清空 tmp 內的檔案後,再重新整理個幾次,就終於出現我要的圖示功能了。
0 意見:
張貼留言