aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators')
-rw-r--r--js/mediators/io-mediator.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index 2f286e5e..deb748c7 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -138,6 +138,20 @@ exports.IoMediator = Montage.create(Component, {
138 enumerable: false, 138 enumerable: false,
139 value: function (file, callback) { 139 value: function (file, callback) {
140 // 140 //
141 var contents, save;
142 //
143 switch (file.mode) {
144 case 'html':
145 file.document.content.document.body.innerHTML = file.body;
146 file.document.content.document.head.innerHTML = file.head;
147 contents = file.document.content.document.documentElement.outerHTML;
148 break;
149 default:
150 break;
151 }
152 //
153 save = this.fio.saveFile({uri: file.document.uri, contents: contents})
154 console.log(save);
141 } 155 }
142 }, 156 },
143 //////////////////////////////////////////////////////////////////// 157 ////////////////////////////////////////////////////////////////////