Difference between revisions of "Template:Pre2/doc"

From CannaQAWiki
Jump to navigationJump to search
m (Protected "Template:Pre2/doc" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(Cleaned up initial import)
 
Line 4: Line 4:
{{tl|{{PAGENAME}}}} uses <code>&lt;pre&gt;</code> 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.
{{tl|{{PAGENAME}}}} uses <code>&lt;pre&gt;</code> 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 &lt;pre&gt; tags (unlike {{tl|pre}}), it will be displayed correctly regardless of how the user's LabLynx Wiki skin renders &lt;pre&gt; boxes.
As it uses real &lt;pre&gt; tags (unlike {{tl|pre}}), it will be displayed correctly regardless of how the user's CannaQAwiki skin renders &lt;pre&gt; boxes.


If you want to disable wikitext in it, you should use &lt;nowiki> tags inside the template (see [[#wikitext|below]]).
If you want to disable wikitext in it, you should use &lt;nowiki> tags inside the template (see [[#wikitext|below]]).
Line 47: Line 47:


[[Category:Programming typing-aid templates|{{PAGENAME}}]]
[[Category:Programming typing-aid templates|{{PAGENAME}}]]
[[Category:LabLynx Wiki XHTML tag replacing templates|{{PAGENAME}}]]
[[Category:CannaQAwiki XHTML tag replacing templates|{{PAGENAME}}]]


</includeonly>
</includeonly>

Latest revision as of 22:58, 15 March 2019

{{Pre2/doc}} 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 CannaQAwiki skin renders <pre> boxes.

If you want to disable wikitext in it, you should use <nowiki> tags inside the template (see below).

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|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.

Using wikitext

To disable wikitext (e.g. [[links]]), <nowiki> tags must be used in the form:

{{Pre2|<nowiki>Your [[text]]{{disambiguation needed|name=Pre2}}, which ''might'' include {{tl|templates}}.<noinclude>[[Category:Examples]]</noinclude></nowiki>}}

This will produce this:

Your [[text]]{{disambiguation needed|name=Pre2}}, which ''might'' include {{tl|templates}}.<noinclude>[[Category:Examples]]</noinclude>

as opposed to:

Your text[disambiguation needed], which might include {{templates}}.

See also

  • {{pre}}, which mimics <pre> tags as rendered with the monobook Wikipedia skin