Question
I know when a lot of people want to paste e-mails on the twiki - the TWiki formatting engine makes it look horrible. I have been having people use the
<verbatim></verbatim> and
%BR% tags - however I feel there must be an easier method.
Environment
--
ArthurClemens - 01 Aug 2007
Answer
You could use
<div style="white-space:pre;">
mail message
</div>
Put the html in variables in Main.TWikiPreferences:
<verbatim>
* Set STARTMAIL = <div style="white-space:pre;">
* Set ENDMAIL = </div>
</verbatim>
So users can write:
%STARTMAIL%
mail message
%ENDMAIL%
--
ArthurClemens - 01 Aug 2007
But what's the benefit of writing
%STARTMAIL% ... %ENDMAIL% over =<verbatim> ... </verbatim>?
-
verbatim may look un-TWikiish, but at least it is documented.
- The solution with a
div element will still cause strange (or wrong) display if the mail contains < or > or & in the wrong places.
- Mail authors sometime take care to line up their lines which makes sense only if a monospace font is used (could be added to the
style attribute, of course)
--
HaraldJoerg - 01 Aug 2007