Help:Templates/Example

From TED Notepad

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?