Hi Alex,
your instructions solved almost all my issues! Now the editor really has all
the styles of the qooxdoo theme! Thanks!
Here is a sample implementation which integrates perfectly into my app:
qx.Theme.include(qx.theme.modern.Appearance,
htmleditor.htmlarea.theme.Appearance);
qx.Class.define("bibliograph.ui.item.view.HtmlEditor",
{
extend : htmleditor.HtmlEditor,
[....]
construct : function()
{
/*
* use qooxdoo styles
*/
var defaultFont =
qx.theme.manager.Font.getInstance().resolve("default");
var styleString = "body { " +
qx.bom.element.Style.compile(defaultFont.getStyles()) + "}";
this.base(arguments,null,styleString);
/*
* additional buttons
*/
var _this = this;
this.createButton("save",{
caption : "Save the editor content",
icon : "icon/16/actions/document-save.png",
handler : function(){ _this.getSaveFunction()(); }
});
this.createButton("exit",{
caption : "Exit the editor",
icon : "icon/16/actions/application-exit.png",
handler : function() { _this.getExitFunction()(); }
});
/*
* create toolbar
*/
this.createToolbar([
"save", "exit", "|",
"bold", "italic", "underline", "para-styles", "|",
"indent", "outdent", "list-ordered", "list-unordered", "justify", "|",
"insert-link", "horiz-ruler","|",
"undo", "redo"
]);
}
});
I had to add the theme files from the HtmlArea trunk into the custom
HtmlArea distribution in HtmlEditor (Commited in rev. 19211). As you say, it
would be much better do use the orginal code to profit from bugfixes in the
main trunk.
Only one warning is left now: "There is no event handler for the event
'mouseup' on target 'undefined'!"
Thanks so much, this was really helpful!
Christian
Alexander Steitz wrote:
>
> Hi Christian,
>
> On Tuesday 08 September 2009 panyasan wrote:
>> Thanks, Alex, for the information which should get me there!
> Sounds good.
>
>> I'll do that. Maybe you can help me with two other problems related to
>> HtmlArea/HtmlEditor:
>>
>> I include the HtmlEditor into a TabView widget. During rendering,
>> there is a notice:
>>
>> qx.theme.manager.Appearance[i]: Missing appearance: html-area
> This is still an open issue for contributions. The theme of a contribution
> is
> not included automatically. Assuming you are using the Modern theme you
> can
> write
>
> --snip--
> qx.Theme.include(qx.theme.modern.Appearance, htmlarea.theme.Appearance);
> --snip--
>
> in your "Application.js" to include the theme of the htmlarea.
>
>> When it comes visible, the following error is thrown:
>>
>> Property styleSheetHref of an instance of htmleditor.htmlarea.HtmlArea
>> is not (yet) ready!
>> http://localhost:8080/Bibliograph/qooxdoo-trunk/framework/source/class/qx/c
>>ore/Property.js Line 639
>>
>> Is there anything I might be doing wrong?
> Nothing wrong here with your code. This was an open issue at the
> HtmlEditor /
> HtmlArea. The HtmlEditor uses an own copy of the HtmlArea and John made
> some
> additions to it. The value of the property "styleSheetHref" is accessed
> but
> the property is not yet setup. Whenever someone calls the getter of a
> property
> it has to either an init value or the setter has to be called before.
>
> I made a quick fix to the HtmlEditor (Revision #19207) to get it back
> working.
>
> @John: We should probably get rid off this own copy of the HtmlArea and
> integrate the HtmlArea as library. I'll write up an email to you with a
> short
> explanation.
>
> cheers,
> 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
>
>
--
View this message in context:
http://www.nabble.com/HtmlEditor-qooxdoo-0.8.3-Theming-tp25336762p25351973.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
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