aboutsummaryrefslogtreecommitdiff
path: root/js/io/document/html-document.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/document/html-document.js')
-rwxr-xr-xjs/io/document/html-document.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/io/document/html-document.js b/js/io/document/html-document.js
index fc7dd05b..24d4e7e4 100755
--- a/js/io/document/html-document.js
+++ b/js/io/document/html-document.js
@@ -43,9 +43,16 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
43 } 43 }
44 }, 44 },
45 45
46
46 // PUBLIC MEMBERS 47 // PUBLIC MEMBERS
47 cssLoadInterval: { value: null, enumerable: false }, 48 cssLoadInterval: { value: null, enumerable: false },
48 49
50 codeViewDocument:{
51 writable: true,
52 enumerable: true,
53 value:null
54 },
55
49 /* 56 /*
50 * PUBLIC API 57 * PUBLIC API
51 */ 58 */
@@ -432,5 +439,26 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
432 */ 439 */
433 } 440 }
434 } 441 }
442 },
443
444 /**
445 * public method
446 * parameter:
447 * removeCodeMirrorDivFlag - for code view, tell to remove the codemirror div after saving
448 */
449 save:{
450 value:function(removeCodeMirrorDivFlag){
451 if(this.currentView === "design"){
452 //generate html and save
453 }else if((this.currentView === "code") && (this.codeViewDocument !== null)){
454 if(removeCodeMirrorDivFlag === true){
455 this.codeViewDocument.save(true);
456 }else{
457 this.codeViewDocument.save();
458 }
459 //persist to filesystem
460 }
461
462 }
435 } 463 }
436}); \ No newline at end of file 464}); \ No newline at end of file