Refactored to add common select2 editor and added document editor.