MediaWiki:Common.js: Difference between revisions

From Protoball
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: $.ready() { if(wgFileName.indexOf("Special:FormEdit") > -1) { $.getScript("/tinymce/jscrip...")
 
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */


$.ready() {
$.ready(function() {
  if(wgFileName.indexOf("Special:FormEdit") > -1) {
  if(wgFileName.indexOf("Special:FormEdit") > -1) {
         $.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js");
         $.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js");

Revision as of 13:36, 19 May 2012

/* Any JavaScript here will be loaded for all users on every page load. */

$.ready(function() {
 if(wgFileName.indexOf("Special:FormEdit") > -1) {
        $.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js");
        $('textarea.tinymce').tinymce({
                // Location of TinyMCE script
                script_url : 'js/tinymce/jscripts/tiny_mce/tiny_mce.js',

                // General options
                theme : "advanced",
                plugins : "pagebreak,style,layer,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

                // Theme options
                theme_advanced_buttons1 : "justifyleft,justifycenter,justifyright,justifyfull,|,hr,nonbreaking,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,fullscreen",
                theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,insertdate,inserttime,preview",
                theme_advanced_buttons3 : "bold,italic,underline,strikethrough,|,link,unlink,anchor,image,cleanup,help,code" ,
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true,
        });
 }
}