In fact, I you need a WYSIWYG editor fast, it's really easy to integrate
TinyMCE in Qooxdoo. I've tested it in Qx 0.7 and the speed was really
raisonnable compared to FCKEditor. 

You can use this kind of code :

v Qx 0.7:

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

var widget = new qx.ui.embed.HtmlEmbed();
var textarea = '<textarea id="tinymce_'+uniqid+'"
name="tinymce_'+uniqid+'">'+initValue+'</textarea>';
widget.setHtml(textarea);

// the event is registered to avoid loading to many instances (ex: if you
use a tabbed system) 
widget.addEventListener("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 "";
};



v Qx 0.8 (small api changes):
 

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 "";
};



John Spackman wrote:
> 
> I realise Alexander is on holiday right now so I'm leaving this as a note
> for when he returns as much as anything.
> 
> I'd like to add my vote to this - a rich text editor is important and
> we've
> abandoned the FCKeditor integration because it's too slow.
> 
> Petr - have you tried the latest SVN version of HtmlArea?  I'm not getting
> the "[object HTMLSpanElement]" bug with that version, even though the demo
> of 0.3-pre does.
> 
> I've nearly finished a wrapper around HtmlArea which adds toolbars for
> styling, formatting, images, links, etc in one Widget; I'd like to
> contribute it as part of the HtmlArea package but obviously don't want to
> go
> steaming in until Alexander is back.  I'll post it here if anyone wants to
> take a look in the mean time.
> 
> John
> 
> -----Original Message-----
> From: Petr Kobalíček [mailto:[EMAIL PROTECTED] 
> Sent: 07 October 2008 08:22
> To: qooxdoo Development
> Subject: Re: [qooxdoo-devel] HtmlArea for 0.8 still not usable
> 
> Hi Fabian,
> 
> I didn't know about his vacation, so it's ok for now :)
> 
> Cheers
> - Petr
> 
> 2008/10/6 Fabian Jakobs <[EMAIL PROTECTED]>:
>> Petr Kobalíček schrieb:
>>> Hi devs,
>>>
>>> I have one idea to the development team. I remember the "table bug
>>> hunting day" and I will be happy if some day in future can be focused
>>> on the HtmlArea. Qooxdoo is very good framework, but it totally fails
>>> in html editing. It's not usable for any kind of cms systems (also for
>>> ecommerce systems, because here should be html content too).
>>>
>>> So my question is. Need anyone html editing in qooxdoo ?
>>>
>>> I have contributed some code to it, but there two critical bugs thats
>>> making HtmlArea totally unusable (bugs are already reported):
>>> - Firefox problem with hiding HtmlArea (once you hide it, you can't
>>> edit)
>>> - In some case when I press enter, I have this text in new line
>>> "[object HTMLSpanElement]"
>>>   this can be reproduced by hitting enter when you focus in HtmlArea
>>>
>>> So my idea is simple: I have some time to contribute to HtmlArea, but
>>> I need that others will fix these two bugs, because I don't know how
>>> to fix them (for HtmlArea authors this should be for few minutes :-) )
>>>
>>> Note: I'm talking about qooxdoo 0.8 from SVN and HtmlArea for 0.8.
>>>
>>> I will provide simple application where others can look at the bugs
>>> I'm talking about.
>>>
>>> Cheers
>>> - Petr
>>>
>>>
>> Alexander, the author of HtmlArea is currently on vacation. I think it
>> is wise to wait until he is back in office. He is committed to build a
>> rock solid html editing component.
>>
>> Best Fabian
>>
>>
>>
>> --
>> Fabian Jakobs
>> JavaScript Framework Developer
>>
>> 1&1 Internet AG
>> Brauerstraße 48
>> 76135 Karlsruhe
>>
>> Amtsgericht Montabaur HRB 6484
>>
>> Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
> Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss,
> Achim Weiss
>> Aufsichtsratsvorsitzender: Michael Scheeren
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/HtmlArea-for-0.8-still-not-usable-tp19815402p20358587.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to