add codemirror client integration, updated server API