Proposal: add a
<literal> block type to protect
HTML.
Every so often I want to embed
HTML cut-and-pasted from elsewhere, or a fragment of script, or an applet or object tag, or a textarea. With the current processing I can't.
There's a simple solution to this; add a
literal block tag that lifts out such code before TWiki processing is applied. For example:
<literal>
<script language="JavaScript">
function wahey() {
document.writeln("WAHEY!");
}
</script>
<textarea rows="15" cols="80">
Here is the text I wante you to cut and paste
* This is a list
* Which TWiki will munge without the literal tag
</textarea>
</literal>
With the generalisation of the
takeOutVerbatim method in the
LocationLocationLocation patch, this would be a trivial 5-minute job to add.
FWIW with the <literal> tag the implementation of
?raw=on&contenttype=text/plain&skin=text also becomes trivial.
--
CrawfordCurrie - 06 Oct 2004
I note also that we often want to reuse such literals. In effect the 'type' parameter of
CommentPlugin provides the insertion and reuse of arbitrary components: I'd be tempted to generalise and rename Comment to COMPONENT and pull in by reference the block you want.
HTML can get very messy, so there might be an argument for keeping such blocks on special topics.
Can you remind me how it is different to <verbatim> ?
--
MartinCleaver - 06 Oct 2004
Verbatim substitutes < and > and encases it in
pre block. Visual effect only.
--
CrawfordCurrie - 06 Oct 2004
Thanks, I was being thick! I did realise what it did but you beat me to getting back to the topic!
--
MartinCleaver - 06 Oct 2004
VaidotasBarzdenas, you voted
http://twiki.org/cgi-bin/rdiff/Codev/EmbeddedHTMLInTopics?type=last&render=sequential&context=9000&_foo=1.7#diff001
do you really only want this a little or actually quite a lot? (both ends of this scale are positive, unlike some)
--
MartinCleaver - 10 Aug 2005
i think its a brilliant idea, lets do it ASAP!
--
TravisBarker - 12 Aug 2005
and just to argue with you for fun, i would say "I want this so much it hurts" is negative, if it hurts, thats a bummer, regardless of why
cheers!
--
TravisBarker - 12 Aug 2005
This seems to be implemented but not documented. We might as well document the feature.
--
PeterThoeny - 08 Jun 2006
Bugs:Item2440
--
WillNorris - 08 Jun 2006
Average desireability: 7.0
Number of votes: 6