ker/mod/wdg.wysiwyg.js
function onMenu( item ) {
    var squire = this.squire;
    var id = item.id;

    switch ( id ) {
    case 'undo':
        squire.undo();
        break;
    case 'redo':
        squire.redo();
        break;
    case 'eraser':
        squire.removeAllFormatting();
        break;
    case 'link':
        makeLink.call( squire );
        break;
    case 'image':
        this.insertImage();
        break;
    case 'format-bold':
        if ( squire.hasFormat( 'b' ) ) {
            squire.removeBold();
        } else {
            squire.bold();
        }
        break;
    case 'format-italic':
        if ( squire.hasFormat( 'i' ) || squire.hasFormat( 'em' ) ) {
            squire.removeItalic();
        } else {
            squire.italic();
        }
        break;
    case 'format-underline':
        if ( squire.hasFormat( 'u' ) ) {
            squire.removeUnderline();
        } else {
            squire.underline();
        }
        break;
    case 'format-align-left':
        squire.setTextAlignment( 'left' );
        break;
    case 'format-align-center':
        squire.setTextAlignment( 'center' );
        break;
    case 'format-align-right':
        squire.setTextAlignment( 'right' );
        break;
    case 'format-align-justify':
        squire.setTextAlignment( 'justify' );
        break;
    case 'font':
        setFontFaceSizeColor.call( squire );
        break;
    case 'format-float-left':
        setFloat.call( squire, 'left' );
        break;
    case 'format-float-center':
        setFloat.call( squire, 'center' );
        break;
    case 'format-float-right':
        setFloat.call( squire, 'right' );
        break;
    case 'format-float-none':
        setFloat.call( squire, 'none' );
        break;
    case 'format-header':
        setHeader.call( squire );
        break;
    default:
        this.processButton( id );
    }
    this.focus = true;
}
function onMenu( item ) {
    var squire = this.squire;
    var id = item.id;

    switch ( id ) {
    case 'undo':
        squire.undo();
        break;
    case 'redo':
        squire.redo();
        break;
    case 'eraser':
        squire.removeAllFormatting();
        break;
    case 'link':
        makeLink.call( squire );
        break;
    case 'image':
        this.insertImage();
        break;
    case 'format-bold':
        if ( squire.hasFormat( 'b' ) ) {
            squire.removeBold();
        } else {
            squire.bold();
        }
        break;
    case 'format-italic':
        if ( squire.hasFormat( 'i' ) || squire.hasFormat( 'em' ) ) {
            squire.removeItalic();
        } else {
            squire.italic();
        }
        break;
    case 'format-underline':
        if ( squire.hasFormat( 'u' ) ) {
            squire.removeUnderline();
        } else {
            squire.underline();
        }
        break;
    case 'format-align-left':
        squire.setTextAlignment( 'left' );
        break;
    case 'format-align-center':
        squire.setTextAlignment( 'center' );
        break;
    case 'format-align-right':
        squire.setTextAlignment( 'right' );
        break;
    case 'format-align-justify':
        squire.setTextAlignment( 'justify' );
        break;
    case 'font':
        setFontFaceSizeColor.call( squire );
        break;
    case 'format-float-left':
        setFloat.call( squire, 'left' );
        break;
    case 'format-float-center':
        setFloat.call( squire, 'center' );
        break;
    case 'format-float-right':
        setFloat.call( squire, 'right' );
        break;
    case 'format-float-none':
        setFloat.call( squire, 'none' );
        break;
    case 'format-header':
        setHeader.call( squire );
        break;
    default:
        this.processButton( id );
    }
    this.focus = true;
}
function onMenu ( item ) { var squire = this . squire ; var id = item . id ; switch ( id ) { case 'undo' : squire . undo ( ) ; break ; case 'redo' : squire . redo ( ) ; break ; case 'eraser' : squire . removeAllFormatting ( ) ; break ; case 'link' : makeLink . call ( squire ) ; break ; case 'image' : this . insertImage ( ) ; break ; case 'format-bold' : if ( squire . hasFormat ( 'b' ) ) { squire . removeBold ( ) ; } else { squire . bold ( ) ; } break ; case 'format-italic' : if ( squire . hasFormat ( 'i' ) || squire . hasFormat ( 'em' ) ) { squire . removeItalic ( ) ; } else { squire . italic ( ) ; } break ; case 'format-underline' : if ( squire . hasFormat ( 'u' ) ) { squire . removeUnderline ( ) ; } else { squire . underline ( ) ; } break ; case 'format-align-left' : squire . setTextAlignment ( 'left' ) ; break ; case 'format-align-center' : squire . setTextAlignment ( 'center' ) ; break ; case 'format-align-right' : squire . setTextAlignment ( 'right' ) ; break ; case 'format-align-justify' : squire . setTextAlignment ( 'justify' ) ; break ; case 'font' : setFontFaceSizeColor . call ( squire ) ; break ; case 'format-float-left' : setFloat . call ( squire , 'left' ) ; break ; case 'format-float-center' : setFloat . call ( squire , 'center' ) ; break ; case 'format-float-right' : setFloat . call ( squire , 'right' ) ; break ; case 'format-float-none' : setFloat . call ( squire , 'none' ) ; break ; case 'format-header' : setHeader . call ( squire ) ; break ; default : this . processButton ( id ) ; } this . focus = true ; }
`this` is the squire object.
this is the squire object .