|
|
@ -20,7 +20,8 @@ class ProseMirrorView { |
|
|
|
state: EditorState.create({ |
|
|
|
state: EditorState.create({ |
|
|
|
doc: defaultMarkdownParser.parse(content), |
|
|
|
doc: defaultMarkdownParser.parse(content), |
|
|
|
plugins: exampleSetup({schema}) |
|
|
|
plugins: exampleSetup({schema}) |
|
|
|
}), dispatchTransaction(transaction) { |
|
|
|
}), |
|
|
|
|
|
|
|
dispatchTransaction(transaction) { |
|
|
|
document.querySelector('#content').value = defaultMarkdownSerializer.serialize(transaction.doc) |
|
|
|
document.querySelector('#content').value = defaultMarkdownSerializer.serialize(transaction.doc) |
|
|
|
let newState = this.state.apply(transaction) |
|
|
|
let newState = this.state.apply(transaction) |
|
|
|
this.updateState(newState) |
|
|
|
this.updateState(newState) |
|
|
|