Question
I'm trying to add a web preference variables
* V = < verbatim>
* E - < /verbatim>
(yes I use 3 spaces before the *, and no space after the html open bracket)
I add this to the topic Main Web > WebPreferences
I then save the topic. I expected that now I could use the %V% and %E% in other
MainWeb topics, but it does not work.
Also, the <verbatim> seems to take affect on the WebPreference page.
How do I make an html tag into a variable?
The documentation is very confusing. It is not clear if I need to edit the topic in order to customize or do something else.
If I edit, it does not do what I expect.
Environment
--
DanBarDov - 16 Apr 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The
<pre> and
<verbatim> tags are handled specially in TWiki, e.g. you cannot put them in preferences variables. Any other HTML tag should be OK. Silly example:
- Set STARTBOLD =
- Set ENDBOLD =
This is
bold text.
--
PeterThoeny - 16 Apr 2006
So any idea of some other HTML tag that would give me what verbatim gives?
(my bad luck that my first preference is a special case huh?)
--
DanBarDov - 17 Apr 2006
<style>
div.fragment{
background: #FFFFCC;
border: 1px solid #CCCCCC;
margin-left: 2em;
margin-right: 2em;
padding: 4px;
}
</style>
<!--
* Set CODE = <div class="fragment">
* Set ENDCODE = </div>
-->
this works pretty well
except for the fact that
linebreaks aren't respected;
anyone know how to do that in
CSS?
a
span tag might be more appropriate, depending on your use case.
--
WillNorris - 17 Apr 2006