User talk:GregoryRasputin: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
if (mwCustomEditButtons) {
if (mwCustomEditButtons) {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/index.php?title=File:TableStart.png",
     "imageFile": "http://www.vitadevwiki.com/images/a/a4/TableStart.png",
     "speedTip": "Table Start",
     "speedTip": "Table Start",
     "tagOpen": "{|",
     "tagOpen": "{|",
Line 11: Line 11:
   
   
   mwCustomEditButtons[mwCustomEditButtons.length] = {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/index.php?title=File:TableCell.png",
     "imageFile": "http://www.vitadevwiki.com/images/7/71/TableCell.png",
     "speedTip": "Table Cell",
     "speedTip": "Table Cell",
     "tagOpen": "|",
     "tagOpen": "|",
Line 18: Line 18:
   
   
   mwCustomEditButtons[mwCustomEditButtons.length] = {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/index.php?title=File:TableRow.png",
     "imageFile": "http://www.vitadevwiki.com/images/4/4c/TableRow.png",
     "speedTip": "Table Row",
     "speedTip": "Table Row",
     "tagOpen": "|-",
     "tagOpen": "|-",
Line 25: Line 25:


   mwCustomEditButtons[mwCustomEditButtons.length] = {
   mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://www.vitadevwiki.com/index.php?title=File:TableEnd.png",
     "imageFile": "http://www.vitadevwiki.com/images/0/06/TableEnd.png",
     "speedTip": "Table End",
     "speedTip": "Table End",
     "tagOpen": "",
     "tagOpen": "",
Line 36: Line 36:
<pre>
<pre>
     mwCustomEditButtons.push({
     mwCustomEditButtons.push({
         "imageFile": "http://www.vitadevwiki.com/index.php?title=File:Button_table.png",
         "imageFile": "http://www.vitadevwiki.com/images/4/4a/Button_table.png",
         "speedTip": "Insert a table",
         "speedTip": "Insert a table",
         "tagOpen": '{| class="wikitable"\n|',
         "tagOpen": '{| class="wikitable"\n|',
Line 43: Line 43:
     });
     });
</pre>
</pre>
add to http://www.vitadevwiki.com/index.php?title=MediaWiki:Common.js

Revision as of 15:28, 27 November 2011

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": ""}
  }

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