create new tag
, view all tags

Feature Proposal: Need Something Between Pre and Verbatim


I want a way to include code or HTML (as with verbatim) but also be able to do bold and italic.

Description and Documentation

Effectively, I want something between pre (which understands and renders all HTML tags unless they are escaped as entities) and verbatim (which turns everything off).

I want to be able to do something like this:

  if (a < 7) {
    do something

without the need to convert the < into & l t ;




-- Contributors: VickiBrown - 28 Apr 2008


In your example, you do not need to write &lt; for <. In fact, TWiki does a pretty good job when guessing whether a < is a less-than or the beginning of a HTML tag. But including HTML is another matter, of course.

If I understand you correctly, then you want to:

  • escape HTML special characters tags in your blocks to <, >, and &
  • ...but use TML like *bold* which is converted to "effective" HTML like bold

I'd guess this would be rather difficult to write down a comprehensive specification:

  • TWiki variables, e.g. for colouring, which expand to HTML might appear as escaped HTML in your block. Should it be escaped? Probably not, but then this would be pretty difficult to implement.
  • Plugins might process TML "too early" so that again the resulting HTML would be escaped later on.

That looks pretty difficult to use or to predict for authors without in-depth knowledge about TWiki's processing order. Maybe you want to write a plugin with a preRenderingHandler for your use cases?

-- HaraldJoerg - 28 Apr 2008

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-04-28 - HaraldJoerg
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.