0

我对 http://aloha-editor.org/guides/events.html#aloha-editable-created-event页面中的 Aloha.trigger 有疑问 如何实际使用

Aloha.trigger( 'aloha-smart-content-changed', {
    'editable'          : , // object of the editable
    'keyIdentifier'     : , // char | null
    'keyCode'           : , // char | null
    'char'              : , // char | null
    'triggerType'       : , // keypress, idle, blur, paste, block-change
    'snapshotContent'   : , // snapshot content of the editable as HTML String
} );

或者

Aloha.trigger( 'aloha-editable-created', [
    // jQuery object reference of an editable
] );

几乎?我找不到任何例子。只能找到 Aloha.bind

Aloha.bind( 'aloha-editable-created', function( jEvent, editable ) {
    console.log( 'editable "' + editable.getId() + '" created' );
});

谢谢

4

1 回答 1

0

使用类似这样的东西

Aloha.bind( 'aloha-smart-content-changed', function( jEvent, aEvent){
      // Get updated content
  console.log( this, jEvent, aEvent.getSnapshotContent() );
      // Get the object that is updated - jQ object 
  console.log($(aEvent.editable.obj).eq(0);
});
于 2013-07-01T19:32:29.477 回答