Fri 18 Aug 2006
Finally, as no one expressed concerns in the mailing list, I just had my work of the enhanced editor2 widget merged into svn. You should be able to use it without any effort: just a svn up should bring you up-to-speed with the latest extensible version of Editor2. And you should be able to test it in the nightly build of dojo as well (of course you have to wait until tomorrow for that).
I admit the committed version has a very limitted toolbar, which lacks a lot compared to the FCKeditor one I ported for testing purpose. I think I can add more buttons to the standard toolbar as a reference of how to use all the available features.
Along the way, I also fixed more than 5 bugs filed on Editor2 (including the old Editor).
Although committed, I still feel not so comfortable with the dialog loading system. I will try to come up with a better approach and migrate the existing dialogs to that. On the other hand, some usability issues will be sorted out: such as warnings for the cut/copy/paste command issue in Mozilla/Firefox.
More document about how to use/customize and extend the editor is required as well. I already started
a page in the dojo wiki, but for now it is only meant to be a placeholder
If you are interested in extending the new editor2, you can look at the built-in plugins. Currently we already have 5 of them, which should cover all the possible ways of extending the editor2: add new commands, add new toolbar items, add new context menu items and change behaviors of the toolbar. They also demonstrate how to write a popup dialog for the editor2. However, as I mentioned in this post, the integration of the dialog support will likely to be change in near future to a better/more dojo-ish way.
Not all the 5 plugins are loaded by default: only the contextmenu plugin is loaded. You can make a simple "dojo.require" to include additional plugins (before you initialize an editor2).
RSS feed for comments on this post. TrackBack this post
August 20th, 2006 at 8:49 pm
This seems really promising.
But, how do I load content dynamically?
August 21st, 2006 at 9:59 pm
I am looking for a way to inject some HTML into the text at the cursor position. Will Editor2 provide me with an ability to do that?
August 21st, 2006 at 10:19 pm
try inserthtml command
August 24th, 2006 at 12:22 am
Thanks, inserthtml works great!
I would like to insert some formatted html. I was planning to use a and use styles to format it properly. It appears that this will work just fine. I would really like to prevent the user from being able to change the inserted text (they can delete it completely if they want, but not change it). Is there any way to do this?
I experimented with inserting some javascript (”document.write”), but it did not appear to be processed.
August 30th, 2006 at 1:30 pm
Hello,
I have a very similar problem as Laurie.
I would like the user not to be able to change a table (add rows, delete rows, …) or even paste a table from Excel into the editor.
How can I do that?
Also, if one clicks into a table, this “special table mode” is activated with arrows to add columns and stuff. How can I deactivate that.
Is there a possibility to check if there is HTML in the clipboard and prevent pasting this HTML (e.g. -again- tables) into the editor?
Any comments are very much appreciated!
October 25th, 2006 at 5:14 pm
Hi, how can the “fontsize” functionality be enabled (-> show a dropdown in the toolbar)?
Thank you!