Trường Thực nghiệm GDPT Tây Ninh


You are not connected. Please login or register

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

KHCN

KHCN
Thành viên xuất sắc
Thành viên xuất sắc
SCEditor đang sử dụng đã được forumotion tùy biến, bổ sung một số BBcode riêng như dailymotion, scroll, rand...

Bên cạnh đó, forumotion cũng lược bỏ một số tính năng và BBcode như emal, print, maximize

Bài viết này sẽ hướng dẫn bạn cách xắp xếp lại toolbar theo ý thích, và bổ sung các tính năng, BBcode ẩn.

Tùy biến toolbar và thêm các BBcode ẩn Rjqfw6C
Toolbar đã tùy biến

Hướng dẫn


ACP >> Display >> Templates >> Post & Private Messages >> posting_body

Tìm:

Code:
{SCEDITOR}

Thêm vào bên dưới:

Code:
<script type="text/javascript">
//<![CDATA[
$(function () {
   $("#text_editor_textarea").sceditor("instance").destroy();
   try {
      FA.SCEditor = {
         sourceMode: bSourceMode
      };
      $("#text_editor_textarea").sceditor({
         locale: locale,
         width: ($.sceditor.ie <= 9) ? '' : '100%',
         height: height,
         plugins: plugin,
         toolbar: 'TOOLBAR',
         style: cssFile,
         rtl: isRtl,
         emoticonsEnabled: emoticonsEnabled,
         emoticonsCompat: true,
         emoticonsRoot: "",
         emoticons: {
            dropdown: smileys
         },
         emoticonsURL: iframeSrc
      });
      var editor = $("#text_editor_textarea").sceditor("instance");
      editor.toggleSourceMode();
      editor.sourceMode(FA.SCEditor.sourceMode);
      if (FA.SCEditor.sourceMode) $("a.sceditor-button-source").addClass("hover");
      if (plugin === 'bbcode') {
         FA_SCEditor.functions.showHideToolbarElements();
         if (!bSourceMode && editor.getSourceEditorValue().length) editor.setWysiwygEditorValue(editor.getSourceEditorValue() + '<br />')
      }
   } catch (e) {
      if (typeof (console) != 'undefined') {
         console.error(e)
      }
   }
   try {
      if (typeof (addSmileyPane) != 'undefined') {
         addSmileyPane()
      }
   } catch (e) {
      if (typeof (console) != 'undefined') {
         console.error(e)
      }
   }
});
//]]>
</script>

Tìm vị trí đánh dấu TOOLBAR (dòng 14) trong code trên, thay bằng mã toolbar của bạn, ví dụ:

Code:
bold,italic,underline,strike|left,center,right,justify|bulletlist,orderedlist,horizontalrule|quote,code,faspoiler,fahide,table|servimg,image,email,link,unlink|youtube,dailymotion,flash|size,color,font,removeformat|date,time,pastetext,cut,copy,paste|more|subscript,superscript,fascroll,faupdown,fawow,farand|print,maximize,source

Lưu ý:

Trong toolbar được phân thành từng cụm chức năng, trong mỗi cụm chức năng sẽ phân ra từng chức năng riêng biệt
Mỗi cụm sẽ cách nhau bằng dấu gạch đứng |
Mỗi BBcode (hoặc chức năng) được ngăn cách nhau bởi dấu phẩy ,

CÁC BBCODE VÀ CHỨC NĂNG CÓ THỂ SỬ DỤNG TRONG FORUMOTION:

Nguồn: DEVs

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Permissions in this forum:
Bạn không có quyền trả lời bài viết

 
Tùy biến toolbar và thêm các BBcode ẩn Flags_1