User talk:GregoryRasputin: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
# upload (http://www.vitadevwiki.com/index.php?title=Special:Upload) the needed buttons
# add category (<nowiki>[[Category:Custom edit buttons]])</nowiki> to their description
# note their URL's to be used below
For global, edit At http://www.vitadevwiki.com/index.php?title=MediaWiki:Common.js and add:
== add seperate "table buttons" to the tool bar ==
== add seperate "table buttons" to the tool bar ==
<pre>
<pre>
Line 32: Line 38:
   }
   }
</pre>
</pre>
save and hardrefresh the edit page to preview the buttons.


== add single "table button" to the tool bar ==
== add single "table button" to the tool bar ==

Revision as of 14:35, 27 November 2011

  1. upload (http://www.vitadevwiki.com/index.php?title=Special:Upload) the needed buttons
  2. add category ([[Category:Custom edit buttons]]) to their description
  3. note their URL's to be used below

For global, edit At http://www.vitadevwiki.com/index.php?title=MediaWiki:Common.js and add:

add seperate "table buttons" to the tool bar


if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/images/a/a4/TableStart.png",
     "speedTip": "Table Start",
     "tagOpen": "{|",
     "tagClose": "",
     "sampleText": ""};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/images/7/71/TableCell.png",
     "speedTip": "Table Cell",
     "tagOpen": "|",
     "tagClose": "",
     "sampleText": "cell"};
 
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/images/4/4c/TableRow.png",
     "speedTip": "Table Row",
     "tagOpen": "|-",
     "tagClose": "",
     "sampleText": ""};

   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/images/0/06/TableEnd.png",
     "speedTip": "Table End",
     "tagOpen": "",
     "tagClose": "|}",
     "sampleText": ""}
  }

save and hardrefresh the edit page to preview the buttons.

add single "table button" to the tool bar

    mwCustomEditButtons.push({
        "imageFile": "http://www.vitadevwiki.com/images/4/4a/Button_table.png",
        "speedTip": "Insert a table",
        "tagOpen": '{| class="wikitable"\n|',
        "tagClose": "\n|}",
        "sampleText": "-\n! header 1\n! header 2\n! header 3\n|-\n| row 1, cell 1\n| row 1, cell 2\n| row 1, cell 3\n|-\n| row 2, cell 1\n| row 2, cell 2\n| row 2, cell 3"
    });

add to http://www.vitadevwiki.com/index.php?title=MediaWiki:Common.js