Skip to content
Snippets Groups Projects
Commit 3e714f92 authored by chris's avatar chris Committed by Yannis Barlas
Browse files

save works on first time

parent 2af7c829
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ export default class SimpleEditor extends React.Component {
const exporter = new SimpleExporter(config)
const convertedSource = exporter.exportDocument(source)
onSave(convertedSource, callback)
onSave(convertedSource)
}
// NOTE -- Theoretically, we shouldn't lock when the editor is in read only
......
......@@ -34,11 +34,11 @@ class SimpleExporter extends HTMLExporter {
throw new Error('Illegal arguments: container is mandatory.')
}
var doc = container.getDocument()
var doc = container.editorSession.getDocument()
this.state.doc = doc
var elements = []
container.data.nodes.body.nodes.forEach(function (id) {
console.log(container)
container.editorSession.document.data.nodes.body.nodes.forEach(function (id) {
var node = doc.get(id)
var nodeEl = this.convertNode(node)
elements.push(nodeEl)
......
......@@ -74,7 +74,7 @@ export class SimpleEditorWrapper extends React.Component {
fragment.source = source
this.update(fragment)
return callback()
// return callback()
}
update (newChapter) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment