setting fld with HTML: "<H3>Title</H3>" results in added empty lines

mfstuart mfstuart at cox.net
Thu May 21 15:48:58 EDT 2009


Hi all,
(hopefully, the html tags I'm using in this message don't get lost in
transit)

Here goes:
When I use the following script to populate a field, the first 2 lines
before the "<H3>" text and the line after the "</H3>" text are empty.
What's up with that?

##
on mouseUp
   put "<H3>This is the title</H3>" into tText
   put "This is the second line" after tText
   set the htmlText of fld 1 to tText
end mouseUp
##

To clean the field up after the above script, I use the following:
delete line 1 to 2 of fld 1  --removes first 2 blank lines
delete line 2 to 2 of fld 1  --removes blank line after "<H3>" text

I've set the properties of the field to the following:
textHeight = 17
fixedLineHeight = unchecked (false)
These help to better proportion the text height with using the "<H3>" tags.

Q: so why would RunRev put these blank lines in using the "set htmlText"
command?
It seems setting the field property is enough to set the style of the field
correctly.

Q: anyone got a better idea how to handle using "<H3>" text, without blank
lines?

--
 Regards,
 Mark Stuart
-- 
View this message in context: http://www.nabble.com/setting-fld-with-HTML%3A-%22%3CH3%3ETitle%3C-H3%3E%22-results-in-added-empty-lines-tp23659327p23659327.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list