Skip to content

Commit

Permalink
Employ exporter on save.
Browse files Browse the repository at this point in the history
Converter still has some errors.
  • Loading branch information
Michael Aufreiter committed Mar 21, 2016
1 parent d7df06b commit 91241d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ var $ = window.$ = require('substance/util/jquery');
var LensWriter = require('../LensWriter');
var LensReader = require('../LensReader');
var Router = require('substance/ui/Router');
var LensArticleExporter = require('../model/LensArticleExporter');
var exporter = new LensArticleExporter();

function App() {
Component.apply(this, arguments);
Expand Down Expand Up @@ -67,7 +69,8 @@ App.Prototype = function() {
cb(null, fileUrl);
},
onSave: function(doc, changes, cb) {
console.log('custom save handler in action...');
var xml = exporter.exportDocument(doc);
console.log('XML', xml);
cb(null);
}
}).ref('writer').route();
Expand Down

0 comments on commit 91241d2

Please sign in to comment.