I have dijit.editor on my page, and when I click the button, I want the contents inside my editor. It should be pretty simple, but I came across this for now.
Nothing, I solved it.
dojo.require("dijit.Editor");
dojo.addOnLoad(function() {
var editor = dijit.byId("myEditor");
var btn1 = dojo.byId("Button1");
editor.attr("value", "Hej igen");
editor.onLoadDeferred.addCallback(function() {
editor.atte("value", "<b>This is new content.</b>");
});
btn1.onclick = function() {
alert(editor.attr("value"));
}
});
marko source
share