Wiki source for DanWestCRT


Show raw source

====CRT Formatter====>>==See Also==
~- [[OnegWRNoDefaultCodeClass | NoDefaultCodeClass]]
>>
==What==
~- Allows you to create a "Green Screen" code formatter.
~- Outputs a Green on Black fixed font block for documentation of command line interfaces.

==Installation==
~- You MUST apply the [[OnegWRNoDefaultCodeClass | NoDefaultCodeClass]] workaround first. This will prevent the //code// class from being applied prior to your formatter being run. Therefore, it stops the classic yellow background
~- install the following in ##formatters/crt.php##

File: **formatters/crt.php**
%%(php)
<?php
echo '<div class="code_crt">';
print('<pre>'.htmlspecialchars($text, ENT_QUOTES).'</pre>');
echo '</div>';
?>
%%

It also requires a small addition to the CSS file (Taken from .code selector)
%%(css)
.code_crt {
color: lime;
background: black;
border: 1px solid #CCC;
font-size: 11px;
font-family: "Lucida Console", Monaco, monospace;
width: 95%;
margin: auto;
padding: 6px 3px 13px 3px;
text-align: left;
overflow: auto;
white-space: nowrap;
}
%%


==To Do==
~- Add link to a demo of this formatter.

----
CategoryUserContributions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki