jslint fixes

    fix for editing links failure in IE,FF,safari.
    fix for toolbar's button active state after selecting text.

Fixes: #252, #158