generic method to display editor.