[Dojo-interest] dijit.Edtor Plugins

Vance Dubberly altjeringa at gmail.com
Thu Dec 13 19:51:03 UTC 2007


My final thoughts on Editor.  This should be moved to dojox.
dijit.Editor is alpha quality at best.  Anybody attempting to extend
Editor or really use it even as is, would do better to bight the
bullet and suffer the extra download of tinymce or fckeditor. Man it's
bad. Or if your interested, re-write it.

Vance

On Nov 26, 2007 12:23 PM, Vance Dubberly <altjeringa at gmail.com> wrote:
> OK found my own problem.  After trying to figure out to use these
> plug-in's unsuccessfully using the dojo book I went to hacking.  And
> used the actually  used the namespace of the plugins.  Oddly this
> gives partially successful results with LinkDialog.  However when I
> decided to just rewrite them myself and went digging through the
> source of Editor.js etc... I found how to call them properly.
>
>
> Things seem to work mostly as expected now.
>
> For anybody else trying to use the plug ins here is how they actually
> get called...
>
>
>         case "createLink":
>                         p = new dijit._editor.plugins.LinkDialog({ command: name });
>                         break;
>                 case "foreColor": case "hiliteColor":
>                         p = new dijit._editor.plugins.TextColor({ command: name });
>                         break;
>                 case "fontName": case "fontSize": case "formatBlock":
>                         p = new dijit._editor.plugins.FontChoice({ command: name });
>
>
>
>
>
>
>
> On Nov 26, 2007 11:19 AM, Vance Dubberly <altjeringa at gmail.com> wrote:
> > So assuming I'd be able to get the editor bug where it explodes in
> > Firefox when created inside a hidden element fixed before launch I
> > went on customizing Editor with the LinkDialog and Then started
> > playing with the FontChoice plug in.  Things are going very badly.
> >
> > LinkDialog
> >
> > 1. There is no obvious "Close This dialog" visual element.
> > 2. To close the dialog you must click outside the editable area.  Not
> > simply outside the dialog.
> > 3. If you clicked in the url bar input and got the error message
> > saying the url is not valid and then close the dialog ( using #2 ) the
> > error message stays visible, the only way to close it is to open a new
> > LinkDialog, unfocus the url input and then close the dialog.
> >
> >
> > FontChoice
> >
> > 1. Only one problem here.  It simply explodes when included... all
> > browsers.  Even when editor is isolated in it's own page
> >
> >
> > Firebug output is:
> >
> > arr has no properties
> > http://wynn/scripts/dojo/dojo.js
> > Line 20
> >
> >
> > toString(undefined, function(), undefined)dojo.js (line 20)
> > (no name)()dojo.js (line 31)
> > toString([Widget dijit.Editor, copy] contentPreFilters=[2]
> > contentPostFilters=[0])dojo.js (line 20)
> > toString(Object name=dijit._editor.plugins.FontChoice, 5)dojo.js (line 20)
> > toString(["bold", "italic", "|", 3 more...], function(), [Widget
> > dijit.Editor, copy] contentPreFilters=[2]
> > contentPostFilters=[0])dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString(Object plugins=[6] name=copy id=copy, textarea#copy)dojo.js (line 20)
> > toString(Object plugins=[6] name=copy id=copy, textarea#copy)dojo.js (line 20)
> > toString([Object plugins=[6] name=copy id=copy, textarea#copy])dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString(textarea#copy)dojo.js (line 20)
> > toString([textarea#copy], function(), undefined)dojo.js (line 20)
> > toString([textarea#copy])dojo.js (line 20)
> > toString(undefined)dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString()dojo.js (line 20)
> > toString(load )
> >
> >
> >
> > Anybody else seen these problems or should I continue looking for
> > mistakes in my own code? Which is
> >
> >
> >     dojo.require("dijit.Toolbar");
> >     dojo.require("dijit.Dialog");
> >     dojo.require("dijit.Editor");
> >
> >     dojo.require("dijit.form.FilteringSelect");
> >     dojo.require("dijit._editor.plugins.LinkDialog");
> >     dojo.require("dijit._editor.plugins.FontChoice");
> >
> >
> >   <textarea id="copy" name="copy" style="width:100%; height:300px"
> >       dojoType="dijit.Editor"
> >       plugins="['bold', 'italic', '|', 'insertUnorderedList',
> > 'dijit._editor.plugins.LinkDialog',
> > 'dijit._editor.plugins.FontChoice']"
> >   >asdf asdf asdf asdfa sdf asdf asdf asdf asd </textarea>
> >
> >
> >
> > Vance
> > --
> > To pretend, I actually do the thing: I have therefore only pretended to pretend.
> >   - Jacques Derrida
> >
>
>
>
> --
> To pretend, I actually do the thing: I have therefore only pretended to pretend.
>   - Jacques Derrida
>



-- 
To pretend, I actually do the thing: I have therefore only pretended to pretend.
  - Jacques Derrida


More information about the Dojo-interest mailing list