MediaWiki:Common.js: Difference between revisions

From Protoball
Jump to navigation Jump to search
No edit summary
(Undo revision 78 by Dave (talk))
Line 8: Line 8:
                 script_url : '/tinymce/jscripts/tiny_mce/tiny_mce.js',
                 script_url : '/tinymce/jscripts/tiny_mce/tiny_mce.js',


                // General options
                theme : "advanced",
                plugins : "pagebreak,style,layer,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
                // Theme options
                theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,hr,nonbreaking,removeformat,visualaid,|,sub,sup,|,charmap,iespell,advhr,|,fullscreen",
                theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,bullist,numlist,|,link,unlink,anchor,cleanup,help,code|,outdent,indent,blockquote,|,undo,redo,|,insertdate,inserttime,preview",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true,
         })});
         })});
  }
  }

Revision as of 14:15, 19 May 2012

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

function textareaTinyMceOnForms() {
 if(wgPageName.indexOf("Special:FormEdit") > -1) {

        $.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js", function() { $('textarea.tinymce').tinymce({
                // Location of TinyMCE script
                script_url : '/tinymce/jscripts/tiny_mce/tiny_mce.js',

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

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

addOnloadHook(textareaTinyMceOnForms);