Help:Custom Edittools: Difference between revisions

Want an adless experience? Log in or Create an account.
no edit summary
m (→‎Edittools: added " after "{{CURRENTUSER}})
No edit summary
Line 6: Line 6:
'''How to construct your Edittools page:'''
'''How to construct your Edittools page:'''


First, go ahead and write whatever content you want to be placed into other pages.  Usually this will be something like a template or base formatting for a new article.  Then place <nowiki><charinsert></charinsert></nowiki> tags around it.  To demonstrate, I'll use the [[Template:Interview|Interview template]], though it's already included when editing articles in the Interview namespace.
First, go ahead and write whatever content you want to be placed into other pages.  Usually this will be something like a template or base formatting for a new article.  Then place <nowiki><charinsert></charinsert></nowiki> tags around it.  To demonstrate, I'll use the [[Template:Infobox|Interview template]], though it's already included when editing articles in the Interview namespace.
<pre><nowiki><charinsert>{{Interview|
<pre><nowiki><charinsert>{{Infobox|interview|
|date =  
| date =  
|interviewee =  
| interviewee =  
|interviewer =  
| interviewer =  
|description =  
| description =  
|source =  
| source =  
}}</charinsert></nowiki></pre>
}}</charinsert></nowiki></pre>
If you stop here, save the page and edit a page, you'll find that you can click on and insert "<nowiki>{{</nowiki>Interview|", or "|date", or "=", etc.  This is because charinsert separates the links with spaces.  To fix this, you have to put spaces between <nowiki><nowiki></nowiki></nowiki> tags.  Since, in this example, there are a lot of spaces, I'll go ahead and put the whole thing in nowiki tags.
If you stop here, save the page and edit a page, you'll find that you can click on and insert "<nowiki>{{</nowiki>Infobox|interview|", or "|date", or "=", etc.  This is because charinsert separates the links with spaces.  To fix this, you have to put spaces between <nowiki><nowiki></nowiki></nowiki> tags.  Since, in this example, there are a lot of spaces, I'll go ahead and put the whole thing in nowiki tags.


Newlines also break charinsert, and they have to be replaced with "&amp;#13;".  After these changes, the final code is:
Newlines also break charinsert, and they have to be replaced with "&amp;#13;".  After these changes, the final code is:
<pre><nowiki><charinsert><nowiki>{{Interview|+&amp;#13;|date = &amp;#13;|interviewee = &amp;#13;|interviewer = &amp;#13;|description = &amp;#13;|source = &amp;#13;}}</nowiki></charinsert></nowiki></pre>
<pre><nowiki><charinsert><nowiki>{{Infobox|interview|+&amp;#13;| date = &amp;#13;| interviewee = &amp;#13;| interviewer = &amp;#13;| description = &amp;#13;| source = &amp;#13;}}&lt;/nowiki></charinsert></nowiki></pre>
The '+' after "Interview|" means that's where the cursor will go when this template is inserted, so you can start filling out the information.
The '+' after "Infobox|interview|" means that's where the cursor will go when this template is inserted, so you can start filling out the information.


You can include as many of these as you want on your Edittools page, each within its own set of charinsert tags, separated by spaces.  Now, every time you edit a page, you can simply scroll down to the Custom Edittools and click on the text you want to add, and it will be inserted where your cursor is in the editing window.
You can include as many of these as you want on your Edittools page, each within its own set of charinsert tags, separated by spaces.  Now, every time you edit a page, you can simply scroll down to the Custom Edittools and click on the text you want to add, and it will be inserted where your cursor is in the editing window.