Difference between revisions of "Help:Templates/Example"

From TED Notepad
 
Line 21: Line 21:
  
 
<pre>
 
<pre>
{{example_start}}The {{feature|Select to Next}} searching for phrase {{string|are}} will result in:
+
{{example_start}}The {{feature|Find, Select to Next}} searching for phrase {{string|are}} will result in:
 
{{example_body}}hi {{example_select|johnny, how are}} you?
 
{{example_body}}hi {{example_select|johnny, how are}} you?
 
{{example_end}}
 
{{example_end}}
 
</pre>
 
</pre>
{{example_start}}The {{feature|Select to Next}} searching for phrase {{string|are}} will result in:
+
{{example_start}}The {{feature|Find, Select to Next}} searching for phrase {{string|are}} will result in:
 
{{example_body}}hi {{example_select|johnny, how are}} you?
 
{{example_body}}hi {{example_select|johnny, how are}} you?
 
{{example_end}}
 
{{example_end}}
  
 
[[Category:Help|{{PAGENAME}}]]
 
[[Category:Help|{{PAGENAME}}]]

Latest revision as of 11:29, 19 November 2013

This set of templates is to be used for showing direct examples. They simulate an edit box, some text within and even the selection. This set consists of:

  • {{example_start}}, which starts an example table. It should be followed by a caption.
  • {{example_body}}, which starts an example body. The body is the text shown in the example.
  • {{example_select}}, which should optionally enclose text, that is to be displayed as selected.
  • {{example_end}}, which closes the example table.


Note: <nowiki> tags may become useful when dealing with empty lines or leading spaces.

Examples

{{example_start}}Example: (The inverted white text represents the selection.)
{{example_body}}hi {{example_select|johnny,}} how are you?
{{example_end}}
Example: (The inverted white text represents the selection.)
hi johnny, how are you?


{{example_start}}The {{feature|Find, Select to Next}} searching for phrase {{string|are}} will result in:
{{example_body}}hi {{example_select|johnny, how are}} you?
{{example_end}}
The Find, Select to Next searching for phrase are will result in:
hi johnny, how are you?