In order to connect to events in dojo editor one has to pass the "events" argument while creating the dojo editor.Value of the argument should be the array of events which user would like to connect to.
For example to connect to "onmousedown".
var editor = new dijit.editor({events:["onmousedown"]});
....
....
dojo.connect(editor,"onMouseDown",function(evt){console.log("onMouseDown from dojo editor"});
Tuesday, September 1, 2009
Monday, August 31, 2009
Dojo Editor
Today I have come across a issue with Dojo Editor and have tried to explore the topic before I fix the issue.
Step 1. Creating a simple dojo Editor.
Dojo provides the Editor widget using which creating the complex Editor is just a one liner like creating a button in HTML.
Following is the smallest code needed to create a Editor Widget.
-----------------------------------------------
......
.... // in script
dojo.require("dijit.Editor");
.........
...........in body
< d iv id="editor" dojotype="dijit.Editor">
Hello World !!!!
< / d iv>
-----
........
-------------------------------------------------
Step 1. Creating a simple dojo Editor.
Dojo provides the Editor widget using which creating the complex Editor is just a one liner like creating a button in HTML.
Following is the smallest code needed to create a Editor Widget.
-----------------------------------------------
......
.... // in script
dojo.require("dijit.Editor");
.........
...........in body
< d iv id="editor" dojotype="dijit.Editor">
Hello World !!!!
< / d iv>
-----
........
-------------------------------------------------
Subscribe to:
Posts (Atom)