TclApps Library Source Code
View Ticket
Not logged in
Ticket UUID: 1076403
Title: html: suggestion for a convenience "tag wrapping" proc
Type: Bug Version: None
Submitter: dgonyier Created on: 2004-12-01 00:14:24
Subsystem: html Assigned To: welch
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2013-07-04 18:09:55
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
In the current version of html, wrapping text with html 
tags is a bit cumbersome in a lot of cases:

Example:

puts "[::html::openTag p]"
puts "This is my paragraph"
puts "[::html::closeTag]"

As a convenience for wrapping text or other data inside 
of tags, I would like to suggest the addition of a 
general ::html::wrapTag command that would work as 
follows:

puts [::hml::wrapTag p "This is my paragraph"]

which would output the following:

<p>This is my paragraph</p>

puts [::html::wrapTag p "foo=bar" "This is my 
paragraph"]

would output:

<p foo=bar>This is my paragraph</p>

and so on.

There are some specialized commands for wrapping 
specific tags around data, such as ::html::cell 
or ::html:row, but the above is a suggestion for a more 
general command that would wrap data in with a 
specified arbitrary tag.