This content has been marked as final. Show 2 replies
This isn't a bug as such. It isn't much of a feature, either. I agree, and I think the Flash team would agree also, that having better HTML support would be good. Check out the blurb on Project Apollo on our Adobe Labs site. We'll have something much better.
It would be very helpful if you would fill out this request form. The more customers complain about a feature, the more likely it will be addressed sooner.
Adobe Feature Request/Bug Report Form
Thank you for the reply and helpful insight.
I followed your advise and submited a bug report.
Robert Vollmar answered the bug request and sent me the following:
"The absolute point sizes used by the Flash Player are not the same as the relative font sizes used in standard HTML. In a web browser, <FONT SIZE=2> indicates a font size that is one point smaller than the browser's default font size. The Flash Player would interpret the tag literally as a font that is 2 pixels in height."
It's probably a good idea for us to add this note to the Flex documentation. I will file it as such.
For my purposes we are using flex as a data manager UI. there are several DB Fields that hold Ntext data types that are edited via an RTE. I have been saving the data directly without modification because if you try and fix the font size issue, when you reload the data it is not viewable by the RTE. So i came up with a CFC format function to fix the issue on the fly when viewing it in the browser window.
This function is probably not the best approach but it works. It will find all the font size attribs and values and add in a style tag with the font size value as the style value. This needs to be done because if you have several font tags all with different values you can not just replace them all with the first value found.
Anyway I hope this article helps someone else besides me.
On the HTML page to display the content:
-- CFC Function --
<cffunction access="public" name="formatRTEHTML" returntype="string" output="false">
<cfargument name="rte_text" type="string" required="yes">
<cfset var new ="">
takes the RichTextEditor.HTMLText contents, and formats it for viewing in HTML
<cfloop list="#rte_text#" delimiters=">" index="L"><cfset r ="">
<cfset x = FindNoCase("SIZE=",L)>
<cfif x gt 0><cfset i = 0>
<cfloop list="#L#" delimiters=" " index="LL"><cfset i = i + 1>
<cfif LL contains "size=">
<cfset fsv = ListLast(LL,chr(34))>
<cfset r = " style='font-size:#fsv#px' ">
<cfset r = Replace(L," "," #TRIM(r)# ")>
<cfset r = r & ">">
<cfset r = L>
<cfset new = new & r>