updated AppAPI.Editor.insertElement to support selection of inserted element