Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Pre: Difference between revisions

Template page
update
Add attribute for T353697
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<pre<includeonly></includeonly> style="overflow: auto;{{{style}}}">{{{1}}}</pre><noinclude>
<pre<includeonly></includeonly> format="wikitext" {{#if:{{{class|}}}|class="{{{class|}}}"}} style="overflow:auto;word-wrap:{{#switch:{{lc:{{{wrap|}}}}}
 
|initial|unset|inherit|revert|normal|break-word|anywhere={{lc:{{{wrap|}}}}}
----
|#default=break-word
Same as using &lt;pre> tags but the text won't run off screen and instead will appear with a scrollbar.
}};overflow-wrap:{{#switch:{{lc:{{{wrap|}}}}}
 
|initial|unset|inherit|revert
The optional parameter of ''style'' may be added for other css format options. For example <nowiki>{{pre |style=color:darkblue |My text here.}}</nowiki>
|normal|break-word|anywhere={{lc:{{{wrap|}}}}}
 
|#default=break-word
'''Code:'''
}};word-break:{{#switch:{{lc:{{{break|}}}}}
{{pre|<nowiki>
|initial|unset|inherit|revert
<pre style="overflow: auto;">{{{1}}}</pre>
|keep-all|normal|break-word|break-all={{lc:{{{break|}}}}}
</nowiki>}}
|#default={{#switch:{{lc:{{{wrap|}}}}}<!--choose default for word-breaks (keep-all|normal|break-word|break-all) depending on wrap-->
 
  |initial|unset|inherit|revert={{lc:{{{wrap|}}}}}
'''Example:'''<br />
  |normal=keep-all
<nowiki>{{pre|</nowiki><br />
  |break-word=break-word<!--legacy for word-break:-->
000000000000000000 lines don't wrap 00000000000... etc.<br />
  |anywhere=break-all
<nowiki>}}</nowiki>
  |#default=normal
 
  }}
Gives:
}};hyphens:{{#switch:{{lc:{{{hyphens|}}}}}
{{pre|
|inherit|initial|revert|unset|none|manual|auto={{lc:{{{hyphens|}}}}}
000000000000000000 lines don't wrap 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|#default={{#switch:{{lc:{{{wrap|}}}}}<!--choose default for inserting hyphens (none|manual|auto) depending on wrap-->
}}
  |initial|unset|inherit|revert={{lc:{{{wrap|}}}}}
 
  |normal|break-word|anywhere|#default=auto
[[Category:Formatting templates|{{PAGENAME}}]]
  }}
</noinclude>
}};{{{style|}}}">{{{1}}}</pre><noinclude>{{Documentation}}</noinclude>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.