htmltext frustrations

Tereza Snyder tereza at
Thu Aug 21 12:09:29 EDT 2008

On Aug 21, 2008, at 10:58 AM, Shari Coxford wrote:

> So I tried putting the text manually into a field, intending not to  
> use external files at all.  Got it looking perfect with center,  
> underline, tabs, etc.  Fld 1 is the template text, nicely formatted  
> directly in Rev with Rev's formatting controls.
> Get the htmltext of fld 1
> Replace xyz with abc in it
> Set the htmltext of fld 2 to it
> And instead of 3 lines being underlined and centered, the entire  
> text was underlined and centered, and nothing I scripted seemed to  
> fix it.
> So... now I've removed ALL fancyness, all bold, all underline, and  
> am trying to work with plain jane text, and it's almost good except  
> it prints as one font size larger.  Both fields have their fonts and  
> sizes set, and so does the stack.  At some point it printed properly  
> (when everything else was wonky the text size was good), now it  
> won't stick with the text size I keep trying to give it.

When you executed "replace xyz with abc in it" when it was the  
htmltext of a field, you may have inadvertently altered the html itself.

The key to working successfully with the htmltext in Rev/MC is to LOOK  
at the htmltext and make sure it expresses what you want the  
formatting to be. Rev sometimes uses <font> and <p> tags where you  
wouldn't if you were writing the html.

Most likely your text size problem is a font tag hanging around in the  

Suggested process:
  - Create the field(s) with formatting.
  - Edit the htmltext to be sure it's clean and correct.
  - Test it.
  - Look at the htmlText before and after script substitutions (use  
"merge" rather than "replace" to avoid accidents) to be sure you're  
doing what you wanted to do.
  - Proceed with your template strategy.

I do this all the time. It works.


More information about the use-livecode mailing list