Hi Christian,

On Monday 07 September 2009 panyasan wrote:
> I have a question that others might be able to answer: If I include the 
> HtmlEditor into my application, the fonts used are the generic html fonts. 
> How would I go about to include the qooxdoo fonts into the HtmlEditor?
The HtmlArea component (which is used by the HtmlEditor) has a parameter 
"styleInformation" which can be used to hand in additional CSS style settings.
So the way to go at the moment is to convert the "default" font into a CSS 
string which is applied to the body of the HtmlArea.

--snip--
var defaultFont = qx.theme.manager.Font.getInstance().resolve("default");
var styleString = "body { ";

// here is the logic to get the CSS out of the "qx.bom.Font" object
styleString += qx.bom.element.Style.compile(defaultFont.getStyles());

styleString += "}";
--snip--

The variable "styleString" can then be handed into the HtmlArea / HtmlEditor 
as second parameter.

> Are there CSS stylesheets I can use or are fonts and other themeing all done
> programmatically? 
There are no CSS stylesheets at the moment. The default CSS values are hard 
coded at the HtmlArea. You can manipulate these default CSS values by handing 
in some additional CSS rules.

> My ultimate goal is that the HtmlEditor content looks exactly the same as 
> the qx.ui.embed.Html widget that displays the same HTML content.
With the snippet above you should get this working. However, I would prefer 
that the HtmlArea offers a property in the future like e.g. "useDefaultTheming" 
which is used to achieve this.
This way the application developer only has to set the property and the 
HtmlArea would get its values (e.g. for fonts, colors etc.) from the current 
theme. 

Can you please report a feature request for this at the qooxdoo bugzilla?

Thanks,
  Alex

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to