pandurangpatil/gwt-codemirror

Add event handling which can be used from GWT code.

Opened this issue · 0 comments

Add event handling which can be used from GWT code.

For more detail which events to handle refer

To add any event mechanism following steps need to be followed. One can also refer to very first commit with on focus event handling

  1. Add eventHandler interface refer OnFocusHandler
  2. add Event instance refer OnFocusEvent.
  3. Modify CodeMirror and add method to accept registration of eventHandler ( refer CodeMirror. addFocusHandler()). Add method which can be called from event handler register through JSNI.
  4. Modify Editor. fromTextArea() JSNI method and register this event through JavaScript refer. And from this JavaScript Event handler call method defined in step three for more details refer onFocus event handling.