createEditor = ({ container, nodes, marks, nodeViews, value }) => {
const schema = new ProsemirrorModel.Schema({ nodes, marks })
const parser = ProsemirrorModel.DOMParser.fromSchema(schema)
const content = (new DOMParser).parseFromString(value, 'text/html')
const doc = parser.parse(content)
const plugins = ProsemirrorExampleSetup.exampleSetup({ schema })
const state = ProsemirrorState.EditorState.create({ doc, plugins })
const view = new ProsemirrorView.EditorView(container, { state, nodeViews })
return view
}