Skip to content Skip to sidebar Skip to footer

How Do I Get The Contents From Dijit/Editor?

I want to use dijit/Editor to allow users to enter formatted text on a form. The documentation is here. I set up a div on my form and added attributes for the HTML Editor.

Solution 1:

The dijit/Editor has the .get('value') method in order to get it's HTML area content ,

So you can simply get a reference of your dijit by using dijit/registry and the use the function .

var myEditor = registry.byId("eed-event-description");
var htmlValue = myEditor.get('value');

See this Fiddle for demo


Post a Comment for "How Do I Get The Contents From Dijit/Editor?"