Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Did you attach your instance of ckEditor to a Widget or Panel before trying to
set
the
Text?
Since the replaceTextArea is called when your instance is attached to your
browser
document, the JavaScriptObject won't be instantiated and you will receive an
error.
We already fixed this issue by creating a waintingText String which will set
the text
only when ckEditor is attached.
This modification is currently in the trunk repository and will be released
with the
next version of gwt-ckeditor
Original comment by emmanuel...@gmail.com
on 3 Mar 2010 at 3:43
Hi Emmanuel and thanks for your reply.
I have done what you explained, something along the lines of:
CKEditor oCKEditor = new CKEditor();
Panel oPanel = new Panel();
oPanel.add(ckEditor);
oCKEditor.setText("hello"); // Setting text AFTER instantiating and attaching
to panel.
...then I attach the panel to the viewport, etc as usual.
But it still does not work. The problem is exactly the same as before.
Is there no other workaround that I try in the meantime? I need to be able to
set
text in the box asap and I don´t know when you are planning to release the new
version (?).
Original comment by uranio...@gmail.com
on 8 Mar 2010 at 11:53
Hi Emmanuel,
As a temporary workaround I´ve added a small delay (1 second) before i attempt
to use
the setText() method. It works fine although I don´t really like using little
hacks
like these.
Anyway, thanks for your help and looking forward for the next release!
Francisco
Original comment by uranio...@gmail.com
on 9 Mar 2010 at 6:39
Hi Francisco,
In fact, the textarea is replaced by the Widget.onLoad method (inherited in
CKEditor). This method is called when the widget is attached to the document's
body.
In your example, certainly you attach the CKEditor to a panel, but if this panel
isn't attached, in any way you want, to the document's body (In most cases,
RootPanel
or RootLayoutPanel) , the onLoad method will never be called, the textarea will
never
be replaced by the ckeditor, and then you can't set the text.
This fact will be treated in the next release by this way :
We keep an instance variable indicating if the textarea has been replaced. If
not,
and if the setText is called anyway, we store the text in a variable, and set it
later, when the CKEditor is attached.
Regards,
Damien
Original comment by picard.d...@gmail.com
on 9 Mar 2010 at 7:02
I am trying to enable Scayt option of Ckeditor with GWT , Not getting any
success
Original comment by waliaspu...@gmail.com
on 24 Jun 2011 at 6:53
Original issue reported on code.google.com by
uranio...@gmail.com
on 3 Mar 2010 at 11:40