diff options
Diffstat (limited to 'js/io/document/text-document.js')
-rwxr-xr-x | js/io/document/text-document.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/io/document/text-document.js b/js/io/document/text-document.js index 156aaacb..a768779f 100755 --- a/js/io/document/text-document.js +++ b/js/io/document/text-document.js | |||
@@ -85,6 +85,22 @@ var TextDocument = exports.TextDocument = Montage.create(baseDocumentModule.Base | |||
85 | 85 | ||
86 | xhr.send(''); | 86 | xhr.send(''); |
87 | } | 87 | } |
88 | }, | ||
89 | |||
90 | /** | ||
91 | * public method | ||
92 | * parameter: | ||
93 | * removeCodeMirrorDivFlag - for code view, tell to remove the codemirror div after saving | ||
94 | */ | ||
95 | save:{ | ||
96 | value:function(removeCodeMirrorDivFlag){ | ||
97 | this.editor.save(); | ||
98 | if(removeCodeMirrorDivFlag === true){ | ||
99 | var codemirrorDiv = this.textArea.parentNode.querySelector(".CodeMirror"); | ||
100 | if(!!codemirrorDiv){codemirrorDiv.parentNode.removeChild(codemirrorDiv);} | ||
101 | } | ||
102 | //persist to filesystem | ||
103 | } | ||
88 | } | 104 | } |
89 | 105 | ||
90 | }); \ No newline at end of file | 106 | }); \ No newline at end of file |