RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Edit table with given operation. If there is no table at cursor then no op.
 * @param editor The editor instance
 * @param operation Table operation
 */
Edit table with given operation. If there is no table at cursor then no op.
@param editor The editor instance
@param operation Table operation
Edit table with given operation . If there is no table at cursor then no op . @param editor The editor instance @param operation Table operation
function editTable(editor, operation) {
    var td = editor.getElementAtCursor('TD,TH');
    if (td) {
        editor.addUndoSnapshot(function (start, end) {
            var vtable = new roosterjs_editor_dom_1.VTable(td);
            vtable.edit(operation);
            vtable.writeBack();
            editor.focus();
            if (!editor.select(start, end)) {
                editor.select(editor.contains(td) ? td : vtable.getCurrentTd());
            }
        }, "Format" );
    }
}
function editTable ( editor , operation ) { var td = editor . getElementAtCursor ( 'TD,TH' ) ; if ( td ) { editor . addUndoSnapshot ( function ( start , end ) { var vtable = new roosterjs_editor_dom_1 . VTable ( td ) ; vtable . edit ( operation ) ; vtable . writeBack ( ) ; editor . focus ( ) ; if ( ! editor . select ( start , end ) ) { editor . select ( editor . contains ( td ) ? td : vtable . getCurrentTd ( ) ) ; } } , "Format" ) ; } }
Edit table with given operation.
Edit table with given operation .
/* Format */