Emit events when opening/closing the htmlsource plugin dialog.