[Dojo-interest] Editor2 content update - resolved

Emily Gu e2005g at gmail.com
Thu Jan 4 16:16:51 MST 2007


Hi,

I want to replace the content of editor when the select box value is
changed. That is, I want to submit a form when select box value changed,
then get new content from server to place in the editor. I couldn't make
replacing content working. Any example is very much appreciated.

Thanks,
Emily


On 7/24/06, Francisco <monteiro at tiscali.co.uk> wrote:
>
>
> Hello Dylan
>
> Your suggestion did not work, however subclassing onLoad does
>
> This works
> _self = this;
>        var editorArgs = {
>        shareToolbar: false,
>        id: Id,
>        htmlEditing: true,
>        closeOnSave: true,
>        onLoad: function(){this.domNode.innerHTML = self.element.value;},
>        focusOnLoad: true
>                        };
> this.editor = dojo.widget.createWidget("Editor2", editorArgs, this.element
> );
>
> Thanks to all!
>
> Francisco
> -----Original Message-----
> From: dojo-interest-bounces at dojotoolkit.org
> [mailto:dojo-interest-bounces at dojotoolkit.org] On Behalf Of Dylan
> Schiemann
> Sent: 24 July 2006 10:58
> To: dojo-interest at dojotoolkit.org
> Subject: Re: [Dojo-interest] Editor2 content update
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> One solution is:
>
> dojo.event.connect(this.editor, "editorOnLoad",
> dojo.lang.hitch(this, function() {
>       this.editor.replaceEditorContent(this.element.value);
>     })
> )
>
> The issue is that the iframe is not created before you try to
> update/replace the content because the editor has not finished loading
> yet.
>
> - -Dylan
>
> Francisco wrote:
> > Any ideas on how to resolve this issue?
> >
> > Francisco
> >
> > -----Original Message-----
> > From: dojo-interest-bounces at dojotoolkit.org
> > [mailto:dojo-interest-bounces at dojotoolkit.org] On Behalf Of Francisco
> > Sent: 22 July 2006 19:53
> > To: dojo-interest at dojotoolkit.org
> > Subject: RE: [Dojo-interest] Editor2 content update
> >
> > The test case can be found here
> > http://xforms.awardspace.com/pack/pack/examples/dojoEditor.html
> >
> > I have tried both the following
> >       this.editor.replaceEditorContent(this.element.value);
> >       this.editor.execCommand("inserthtml", this.element.value);
> >
> > Works on IE fails on FF
> >
> > Francisco
> >
> >
> > -----Original Message-----
> > From: dojo-interest-bounces at dojotoolkit.org
> > [mailto:dojo-interest-bounces at dojotoolkit.org] On Behalf Of Alex Russell
> > Sent: 22 July 2006 19:14
> > To: dojo-interest at dojotoolkit.org
> > Cc: Francisco
> > Subject: Re: [Dojo-interest] Editor2 content update
> >
> > On Saturday 22 July 2006 7:09 am, Francisco wrote:
> >> If I use replaceEditorContent it works fine on IE, on FF it says
> >> "this.window has no properties" dojo.js line 1312
> >
> > Sounds like a bug. Got a test case?
> >
> > Regards
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFExJms8nLgh/JJsxERAvvOAJ9lYtNcdca1ctdu8F3w5TGk09X0AQCgnVun
> rIocFlZbZo60v/PSo1q9sME=
> =2UZ/
> -----END PGP SIGNATURE-----
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070104/9efd3156/attachment.html


More information about the Dojo-interest mailing list