Forum:Need help inserting text...

Hey

I would like the add some text to the MediaWiki:Newarticletext, so that you people click on it, it will insert it into the editing field. like charinsert, just with at couple lines of text.

The text is a often used infobox.

--Mikkel S. 10:08, 31 May 2008 (UTC)


 * charinsert works on all pages, so you put it on MediaWiki:newarticletext. For example,
 * --Ciencia Al Poder (talk) -WikiDex 10:55, 31 May 2008 (UTC)

But is there a way to make this work with line separation, i need the whole infobox, and when i use charinsert separates them by line. --Mikkel S. 11:44, 31 May 2008 (UTC)


 * Ok, I see. Other solution would be to use Custom edit buttons. But they will be shown on every page edit. If you want to show them only on new articles, they could be put inside a

if (wgArticleId==0){ // Custom edit buttons here }
 * To make newlines work, replace them with "\n". For example:

if (wgArticleId==0){ mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/2/29/Button_user.png", "speedTip": "Character Infobox", "tagOpen": "", "sampleText": ""}; }
 * I'd split the code between open and close tags so the cursor will be positioned in the first parameter. --Ciencia Al Poder (talk) -WikiDex 18:36, 31 May 2008 (UTC)


 * There's also a way to use preload template in a create box or in an url.
 * For the create box, we have made a few on fr.guildwars : (in french though). — TulipVorlax 02:22, 1 June 2008 (UTC)