aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 22467b44..7e2fb599 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -178,6 +178,12 @@ DocumentController = exports.DocumentController = Montage.create(Component, {
178 break; 178 break;
179 default: 179 default:
180 //Open in code view 180 //Open in code view
181 var code = Montage.create(TextDocument, {"source": {value: doc.content}}), docuuid = Uuid.generate(), textArea;
182 textArea = this.application.ninja.stage.stageView.createTextAreaElement(docuuid);
183 code.initialize(doc, docuuid, textArea, textArea.parentNode);
184 code._documentType = doc.extension;
185 code.textArea.value = doc.content;
186 this.application.ninja.stage.stageView.createTextView(code);
181 break; 187 break;
182 } 188 }
183 189