Difference between revisions of "Template:Txtbox"

From PC-BSD Wiki
Jump to: navigation, search
(wrap options)
(Example)
Line 22: Line 22:
 
<nowiki>''</nowiki>''second line<nowiki>''</nowiki> - <nowiki>{{</nowiki>redlight|are possible too.<nowiki>}}</nowiki>'''}}'''
 
<nowiki>''</nowiki>''second line<nowiki>''</nowiki> - <nowiki>{{</nowiki>redlight|are possible too.<nowiki>}}</nowiki>'''}}'''
  
== Example ==
+
=== Result ===
  
 
{{txtbox|pre|box=content such as parens containing 5(    ) spaces preserved,
 
{{txtbox|pre|box=content such as parens containing 5(    ) spaces preserved,
 
'''second line''' - {{highlight|note that bold and italic and highlight/redlight}}|txt=Text to right of box
 
'''second line''' - {{highlight|note that bold and italic and highlight/redlight}}|txt=Text to right of box
 
''second line'' - {{redlight|are possible too.}}}}</noinclude><noinclude>[[category:templates]]<!-- There must not be any spaces after this comment. --></noinclude><noinclude>
 
''second line'' - {{redlight|are possible too.}}}}</noinclude><noinclude>[[category:templates]]<!-- There must not be any spaces after this comment. --></noinclude><noinclude>

Revision as of 05:35, 18 February 2013

Contents

Explanation

This template encloses the provided text within a dashed line box. The text to the right of the box may be some type of comment such as "a prompt asking for the root password will open.". By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note the <nowiki> 'prefixed with a space' formatting trick should be avoided. Other style markup like for italic or bold should be placed directly around the specific content and not around the entire template. Individual # symbols should be replaced with {{pound}} and a series of pound symbols may be enclosed within nowiki tags or they will be parsed as numbered list elements.

wrap options

normal = white-space: normal; - multiple white space collapses, text wraps at box border.

wrap = white-space: pre-wrap; - whitespace preserved, text wraps at box border and line breaks. wiki = white-space: nowrap; - This is the brain damaged method the magic (prefix w/space) wiki text boxes use. collapse = white-space: pre-line; - multiple white space collapses, text wraps at box border and line breaks. code = white-space: pre; - easier to remember effect name.

pre = white-space: pre; - DEFAULT: acts like 'pre' whitespace preserved, text wraps at box border and line breaks.

Usage

{{txtbox|pre|width=value|box=content such as parens containing 5( ) spaces preserved,
'''second line - {{highlight|note that bold and italic and highlight/redlight}}'''
|txt=Text to right of box<br>
''second line'' - {{redlight|are possible too.}}}}

Result

content such as parens containing 5( ) spaces preserved, second line - note that bold and italic and highlight/redlight
Text to right of box second line -  are possible too. 
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox