User talk:GregoryRasputin: Difference between revisions
Jump to navigation
Jump to search
m (Created page with "== add seperate "table buttons" to the tool bar == <pre> if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://community.wi...") |
mNo edit summary |
||
Line 31: | Line 31: | ||
"sampleText": ""} | "sampleText": ""} | ||
} | } | ||
</pre> | </pre> | ||
== add single "table button" to the tool bar == | == add single "table button" to the tool bar == | ||
<pre> | <pre> | ||
if (mwCustomEditButtons) { | |||
mwCustomEditButtons.push({ | mwCustomEditButtons.push({ | ||
"imageFile": "//upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png", | "imageFile": "//upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png", | ||
Line 43: | Line 43: | ||
"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" | "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" | ||
}); | }); | ||
} | |||
</pre> | </pre> |
Revision as of 01:41, 27 November 2011
add seperate "table buttons" to the tool bar
if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://community.wikia.com/wiki/File:TableStart.png", "speedTip": "Table Start", "tagOpen": "{|", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://community.wikia.com/wiki/File:TableCell.png", "speedTip": "Table Cell", "tagOpen": "|", "tagClose": "", "sampleText": "cell"}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://community.wikia.com/wiki/File:TableRow.png", "speedTip": "Table Row", "tagOpen": "|-", "tagClose": "", "sampleText": ""}; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://community.wikia.com/wiki/File:TableEnd.png", "speedTip": "Table End", "tagOpen": "", "tagClose": "|}", "sampleText": ""} }
add single "table button" to the tool bar
if (mwCustomEditButtons) { mwCustomEditButtons.push({ "imageFile": "//upload.wikimedia.org/wikipedia/en/6/60/Button_insert_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" }); }