I got that error in the console and nothing on screen when I try.
Not sure what to do ... any idea ?

On 4 mars 2011, at 14:54, Jean-Baptiste BRIAUD -- Novlog wrote:

> Hi,
> 
> I'm not sure this will work :
>> var ckeditor = new qooxdoo.widgets.Ckeditor();
> 
> 
> This is because the constructor need parameters :
>> construct: function(value, menubarheight)
> 
> What is the value ? Is it the initial widget's value ?
> 
> BTW, thanks for the integration.
> 
> 
> On 30 janv. 2011, at 08:40, Gregory Beaver wrote:
> 
>> Hi,
>> 
>> After banging my head on the wall forever, I got CKEditor integration to 
>> work.  It is NOT trivial, but the result is pretty small in LOC.  Basically, 
>> CKEditor never updates the textarea value unless you do it explicitly, and 
>> so in qooxdoo-world, that means attaching to an execute event on a button 
>> for most forms.  Thus, to use my little TextArea replacement, you need to 
>> follow 3 simple steps;
>> 
>> 1) load ckeditor.js in the <head> of your index.html BEFORE qooxdoo.js
>> 2) use code like so:
>> 
>> var ckeditor = new qooxdoo.widgets.Ckeditor();
>> var savebutton = new qx.ui.form.Button("Save");
>> 
>> ckeditor.linkTo(savebutton);
>> savebutton.addListener("execute", function() {
>>   alert(ckeditor.getValue());
>> });
>> 
>> 3) include this code:
>> 
>> /* ************************************************************************
>> 
>>    qooxdoo - the new era of web development
>> 
>>    http://qooxdoo.org
>> 
>>    Copyright:
>>      2004-2007 1&1 Internet AG, Germany, http://www.1and1.org
>> 
>>    License:
>>      LGPL: http://www.gnu.org/licenses/lgpl.html
>>      EPL: http://www.eclipse.org/org/documents/epl-v10.php
>>      See the LICENSE file in the project's top-level directory for details.
>> 
>>    Authors:
>>      * Gregory Beaver ([email protected])
>> 
>> ************************************************************************ */
>> 
>> qx.Class.define("qooxdoo.widgets.Ckeditor", {
>>   extend: qx.ui.form.TextArea,
>>   properties: {
>>     appearance: {
>>       refine: true,
>>       init: "widget"
>>     }
>>   },
>> 
>>   /*
>>   
>> *****************************************************************************
>>      MEMBERS
>>   
>> *****************************************************************************
>>   */
>> 
>>   /**
>>    * Main method - application start point
>>    */
>>   construct: function(value, menubarheight)
>>   {
>>     if (!menubarheight) {
>>       menubarheight = 141; // default menubar is 141px
>>     }
>>     this.base(arguments, value);
>>     this.addListenerOnce("appear", function(e) {
>>       var el = this.getContentElement().getDomElement();
>>       var hint = this.getSizeHint();
>>       this.__ckEditor = CKEDITOR.replace(el, {
>>         height            : hint.height - menubarheight - 42,
>>                                                     //  42px for the frame
>>         width             : hint.width,
>>         resize_enabled    : false,
>>         tabIndex          : this.getTabIndex(),
>>         toolbar           : [ // everything but Maximize
>>           ['Source','-','Save','NewPage','Preview','-','Templates'],
>>           ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 
>> 'SpellChecker', 'Scayt'],
>>           
>> ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
>>           ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 
>> 'Button', 'ImageButton', 'HiddenField'],
>>           '/',
>>           
>> ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
>>           
>> ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
>>           ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
>>           ['BidiLtr', 'BidiRtl' ],
>>           ['Link','Unlink','Anchor'],
>>           
>> ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
>>           '/',
>>           ['Styles','Format','Font','FontSize'],
>>           ['TextColor','BGColor'],
>>           ['ShowBlocks','-','About']
>>         ]
>>       });
>>       
>>     }, this);
>>   },
>>   members :
>>   {
>>     __ckEditor: null,
>>     linkTo: function(savebutton)
>>     {
>>       savebutton.addListener("execute", function() {
>>         var old = this.getValue();
>>         this.__ckEditor.updateElement();
>>         var val = this.getValue();
>>         if (old != val) {
>>           this.fireDataEvent("changeValue", val, old);
>>         }
>>       }, this);
>>     }
>>   }
>> });
>> 
>> It is beautiful, and kicks qooxdoo's HtmlArea's butt (sorry to internal 
>> devs, I tried to use htmlarea for a year, but it is too quirky to be 
>> practical).
>> 
>> Hopefully this saves others the headache I have.
>> 
>> Greg
>> ------------------------------------------------------------------------------
>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
>> Finally, a world-class log management solution at an even better price-free!
>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
>> February 28th, so secure your free ArcSight Logger TODAY! 
>> http://p.sf.net/sfu/arcsight-sfd2d_______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to