> What do I add to my StyleSheet at
> to make it format like code instead of wikifying?
>
> I tried putting {{{ and }}} at the beginning & end of the code, but
> then it doesn't seem to run the code at all

!!!HowTo: Using PRE formatting with 'special' tiddler content:

When used to surround normal tiddler content, {{{ and }}} (on separate
lines) creates a PRE element when that tiddler content is rendered.
However, this syntax can't be used in the [[StyleSheet]], because that
content is also passed to the browser for parsing as CSS style rules,
but {{{ and }}} are not valid CSS syntax and trigger an error.  As a
result, the rules following the opening {{{ will never be processed.

Fortunately, TiddlyWiki addresses this by providing variant on the
usual {{{ and }}} syntax, by wrapping them within CSS-compatible
comment markers, like this:
   /*{{{*/
   ... CSS rules go here ...
   /*}}}*/

Similarly, TiddlyWiki templates (PageTemplate, ViewTemplate,
EditTemplate) have the same problem, except that they use HTML syntax
instead of CSS syntax. Thus, to apply the PRE formatting to the
display of template content (without affecting the actual template
definition), use HTML-style comment markers, like this:
   <!--{{{-->
   ... template HTML syntax goes here ...
   <!--}}}-->

As with stylesheets and templates, TiddlyWiki plugins (i.e., tiddlers
tagged with 'systemConfig') are also handled specially: they contain
program code that is invoked during document startup, and thus must be
valid javascript syntax.  In this case, you can use either of the two
forms of comments supported by javascript:
   //{{{
   ... javascript code goes here ...
   //}}}
OR
   /*{{{*/
   ... javascript code goes here ...
   /*}}}*/

Lastly, if you want to render an extended multi-line block of wiki
content within either a stylesheet or plugin tiddler, you can use this
comment syntax:
   /***
   ... wiki content goes here ...
   ***/

The extra "3 stars" comment markers are specially-recognized by
TiddlyWiki so that the content within is rendered as wiki-formatted
output while display of the surrounding /*** and ***/ markers is
completely suppressed.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to