Page 1 of 1
htmlText and CSS
Posted: Mon Jun 17, 2013 10:27 pm
by monte
While I think implementing CSS is a little pointless if we will eventually have a proper browser control it might be nice to be able to set the styles of h1-6 and blockquote... maybe strong and em too. At first glance this doesn't look overly complicated... If we had a multi-dimensional array keyed on tag with textStyle, textColor and textFont keys we could use that instead of the default styles for these things...
Syntax idea:
Code: Select all
set the htmlStyles of fld X to theArray
I haven't thought about inheritance yet which may complicate things... setting the htmlStyles for a stack... leaving some empty... that kind of thing
Re: htmlText and CSS
Posted: Tue Jun 18, 2013 5:40 am
by monte
More thoughts on this... it would be fairly complicated to have fields update when you set the htmlStyles.. but fairly easy if the htmlStyles only applies to subsequent settings of the htmlText... I was thinking the latter... If the former you would need to work out if the style of a run matches one of those tags then change it... If we could work that out then perhaps the htmlText could return those tags rather than what they are translated to...
The idea that we could use the inheritance path and styles applied to these tags to change lots of fields in one hit is enticing...
Hmm... it might also be interesting to have a single property on a field that set it's styling to make use of the separate inheritance paths for plain text, h1, h2 etc without having to use htmlText...