Moving preview handling largely to wikiamediainsertdialog. ESC key handling