Tags:
create new tag
, view all tags

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

TWiki version:  
TWiki plugins:  
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

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

 
Change status to:
Topic revision: r2 - 2007-08-01 - HaraldJoerg
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.