permaculture playing cards*
The moose likes HTML, CSS and JavaScript and the fly likes Dojo - dijit.Editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dojo - dijit.Editor" Watch "Dojo - dijit.Editor" New topic
Author

Dojo - dijit.Editor

Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Hi Peter,

I just playing around Dojo widgets and it's looking cool. Found that dijit.Editor widget having some basic facilities to support rich text contents. However, could you please provide your comments on the below queries?

1. Is it possible to extend the dijit.Editor widget to include few more facilities like "Insert Hyperlink", "Insert Image" etc? These are the normal facilities expected from any rich text area components.

2. Why this widget is not tied to the "form" element? Any specific reason?

TIA
Mourougan


Mourougan
Open Source leads to Open Mind
Peter Svensson
Author
Ranch Hand

Joined: Sep 29, 2008
Posts: 54
Hi Mouraganandame,
I'm not very good at the Editor, unfortunately. I know that it is plugin-based, so extensibiity should be possible.

Here is a fairly good documentation page on the Editor;

http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text

Cheers,
PS
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Hi Peter,

I could not understand how to use the plugins in the link you provided to DojoToolkit site. I followed the same way it was stated in the site is also not working. And there is no option to insert image also.

However, I did google and found this link which is again from same dojotoolkit site but I guess it is based on old version of dojo...not so sure. And it looks very cool with all the features I was looking for. But not so sure why all those functionalities have been removed or hidden from the latest version.

Any suggestions or advice on this. Understand you do not have much hands on with editor widget. However could you able to direct me to any other links or useful samples?

Bunch of thanks in advance.
Mourougan
Peter Svensson
Author
Ranch Hand

Joined: Sep 29, 2008
Posts: 54
Hmm. Let's see. There's a better rundown on editor features, usage and plugins onelinke further on dojocampus;

http://docs.dojocampus.org/dijit/Editor#plugins

Other than that, I can only recommend you to learn how to make custom widgets since much of the information you need is very similar. Also, dive down into the source code and look at it. Very often there'sa lot of documentation left in the source by the contributors.

Cheers,
PS
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Eureka......!!!

Thanks Peter.

I dig into the source code and found the way of making plug-in works. the link you provided also helped me a lot.

Below is the code for my fantasy rich text editor with all the features I was looking for (excluding insert image). There is no plug-in for insert image functionality as of now I guess. Anyway, I'll try to write a plug-in for this soon and make my rich text editor complete



In addition, since the editor is not a form widget, I may need to workout on this part and get the content of the editor to be submitted along with the form.

And also, there is some validation failure in the font dropdowns, I'll try to explore and fix this as well. Hope this may be a minor one.

Anyway, I learned a lot from you (thanks again Peter) as I mentioned in the welcome thread.

Cheers,
Mourougan
[ December 04, 2008: Message edited by: Mourouganandame Arunachalam ]
Peter Svensson
Author
Ranch Hand

Joined: Sep 29, 2008
Posts: 54
Hi Mourougan,

I am very glad that I've managed to guide you to the correct information
One think I would like to add, do you think you could contribute your changes and additions to Dojo as a project? Maybe this is not possible due to contractual dmeands, but otherwise I think it would be greatly appreciated. Dojo is large, and need constant participation.

Cheers,
PS
Mourouganandame Arunachalam
Ranch Hand

Joined: Oct 29, 2008
Posts: 396
Hi Peter:

That's really great to hear. If I can contribute something useful to others.. why not?

Once I complete my changes and tested properly, I'll surely contribute the changes to Dojo. However, Dojo team should ready to agree for validating and accepting my submission anyway.

Anyway, thanks for your suggestion.

Cheers,
Mourougan
Raquel Navas
Greenhorn

Joined: Apr 01, 2010
Posts: 2
I wonder if someone could tell me how to save with javaScript the dijit.Editor with a table inside it.

The following code works with formated text, but when I insert a table, it doesn´t work.

dijit.byId('idDijit.Editor').getValue()
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Raquel Navas wrote:I wonder if someone could tell me how to save with javaScript the dijit.Editor with a table inside it.

The following code works with formated text, but when I insert a table, it doesn´t work.

dijit.byId('idDijit.Editor').getValue()


You pulled up a post that is 2 years old when an author of a book was here. Not many people hang around here that use Dojo so you may want to post this on the Dojo message boards if you have not done so already.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dojo - dijit.Editor
 
Similar Threads
Struts2 dojo not working on RAD7 WS6.1
suggestions for rich text editor
Rich Text Editor
Changing the font family of a dojo text area (dijit.Editor)
RichText