diff --git a/app/components/SimpleEditor/SimpleEditor.jsx b/app/components/SimpleEditor/SimpleEditor.jsx index 06551ae9b663a211d5d1fc7e717f96fdcabc0ad7..c98aee54b25585b5515e75ee510ff7a5ba697d7e 100644 --- a/app/components/SimpleEditor/SimpleEditor.jsx +++ b/app/components/SimpleEditor/SimpleEditor.jsx @@ -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 diff --git a/app/components/SimpleEditor/SimpleEditorExporter.js b/app/components/SimpleEditor/SimpleEditorExporter.js index 3264721fc9ef869e570eebeac39572b31f1bcde4..34afcfb3a24b5b3d23d50857248db85792d5b434 100644 --- a/app/components/SimpleEditor/SimpleEditorExporter.js +++ b/app/components/SimpleEditor/SimpleEditorExporter.js @@ -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) diff --git a/app/components/SimpleEditor/SimpleEditorWrapper.jsx b/app/components/SimpleEditor/SimpleEditorWrapper.jsx index 58391dc02bfdf6640b4ead96977f95a6299ddb41..a833c13da8c17be8d953b2a52d610a8c58b30900 100644 --- a/app/components/SimpleEditor/SimpleEditorWrapper.jsx +++ b/app/components/SimpleEditor/SimpleEditorWrapper.jsx @@ -74,7 +74,7 @@ export class SimpleEditorWrapper extends React.Component { fragment.source = source this.update(fragment) - return callback() + // return callback() } update (newChapter) {