From c3c2ffc8d057660b7c42b45442885cd0d2d598bc Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Sun, 20 May 2012 15:16:06 -0700 Subject: use documents parent container property Signed-off-by: Ananya Sen --- js/document/document-text.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/document/document-text.js') diff --git a/js/document/document-text.js b/js/document/document-text.js index 09525f4e..bb63f5f8 100755 --- a/js/document/document-text.js +++ b/js/document/document-text.js @@ -31,7 +31,6 @@ exports.TextDocument = Montage.create(Component, { enumerable: false, value : function(file, context, callback, view){ var codeDocumentView = CodeDocumentView.create(), container = null; - codeDocumentView.initialize(); //Creating instance of Text Document Model this.model = Montage.create(TextDocumentModel,{ @@ -40,6 +39,8 @@ exports.TextDocument = Montage.create(Component, { views: {value: {'code': codeDocumentView, 'design': null}} }); + codeDocumentView.initialize(this.model.parentContainer); + codeDocumentView.textArea.value = file.content; codeDocumentView.initializeTextView(file, this); -- cgit v1.2.3