Hi Skar,

If you prefer using TinyMCE, it's not so complicated to integrate it via
qooxdoo. This code should show you some ideas (it's a bit hacky but it
works): 

var initValue; // set the tinyMCE content
var uniqid; // pseudo-random id to set to allow several tinyMCE instance

var widget = new qx.ui.embed.Html();
var textarea = '<textarea id="tinymce_'+uniqid+'"
name="tinymce_'+uniqid+'">'+initValue+'</textarea>';
widget.setHtml(textarea);
widget.addListener("appear",function(e)
{
        if (tinyMCE && !this.tinyEnabled)
        {
                tinyMCE.execCommand("mceAddControl", false,
"tinymce_"+uniqid);
                this.tinyEnabled=true;
        }
}
                               
widget.getValue = function()
{
        if (tinyMCE && tinyMCE.get("tinymce_"+uniqid))
        {
                return tinyMCE.get("tinymce_"+uniqid).getContent();
        }
        else
        {
                if (tinyMCE && !tinyMCE.get("tinymce_"+uniqid))
                        return
document.getElementById("tinymce_"+uniqid).value; //textarea fallback
        }
                                       
        return "";
};


By the way, there's currently a special Jquery-version of tinyMCE. I don't
know "how exactly" it uses Jquery but I suppose it shouldn't so complicated
to translate it into native qx.bom element if necessary.

Good Luck,

Regards,

BenoƮt. 



skar wrote:
> 
> Hi Christian,
>>
>> according to the qooxdoo news, the HTMLArea widget will be moved into the
>> trunk. If we're lucky, the maintainer of the HtmlEditor contrib finds
>> time
>> to update the contribution - then the World of Qooxdoo will be, once
>> again,
>> even shinier than before. :-)
>>   
> Thanks, will try HtmlArea instead :)
> 
> cheers,
> skar.
> 
> -- 
> --
> The life so short, the craft so long to learn. 
> 
> 
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing. 
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/WYSIWYG-html-editor-inside-qooxdoo-tp4125354p4125453.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to