Examples of EditorBase


Examples of org.sgx.yuigwt.yui.editor.EditorBase

  @Override
  public void ready(final YuiContext Y) {
    final Console console1 = Y.newConsole(ConsoleConfig.create().width("50%"));
    console1.render();
   
    EditorBase editor = Y.newEditorBase(EditorBaseConfig.create().
      content("<strong class=\"foo\">This is <em>a test</em></strong>. Please edit me. <strong>This is <em>a test</em></strong>")
    );
   
     //Add the BiDi plugin
      editor.plug(Y.Plugin().EditorBidi());
           
      editor.on(EditorBase.EVENT_NODECHANGE, new EventCallback<EditorBaseEvent>() {
      @Override
      public void call(EditorBaseEvent e) {
        console1.log("node changed: "+e.changedType());
      }     
    });      
     
      editor.on("dom:keydown", new EventCallback<EditorBaseEvent>() {
      @Override
      public void call(EditorBaseEvent e) {
        console1.log("dom:keydown: target: "+e.frameTarget().get("id")+
          " - keycode: "+e.frameEvent().keyCode());
      }     
    });      
     
      editor.render(parent);
  }
 
});
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.