Template:Pre2/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Unused0029
m add wrap header
meta>Unused0029
fix (add an =)
Line 7: Line 7:


==Usage==
==Usage==
===Wrapped text==
===Wrapped text===
<span style="background-color:white"><code><nowiki>{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<span style="background-color:white"><code><nowiki>{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.</nowiki>
<p>
<p>

Revision as of 22:46, 13 June 2008

This template uses <pre> tags, but with text that is either wrapped or is contained in a horizontal scrollbox. This means the text will not stretch past the right side of the screen.

As it uses real <pre> tags (unlike {{pre}}), it will be displayed correctly regardless of how the user's Wikipedia skin renders <pre> boxes.

Usage

Wrapped text

{{Pre2|Text to be displayed. And more and more and more... and a paragraph break.

And then more and more...}}

produces:
Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break.

And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.

Scrollbox

{{Pre2|type=scroll|Text to be displayed. And more and more and more... and a paragraph break.

And then more and more...}}

produces:
Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and a paragraph break.

And then more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.

Improvements

If anyone knows how to do it, it would be much simpler to use the only thing that had to be typed to get it to generate a scrollbox was scroll instead of type=scroll.

See also