app/js/annotations.js
// Writes to htmlFile (for annotations)
Writes to htmlFile (for annotations)
Writes to htmlFile ( for annotations )
function saveHtmlFile() {
    console.log("write file called");
    let iframe = document.getElementById("html_disp");
    let doc = iframe.contentDocument? iframe.contentDocument: iframe.contentWindow.document;
    let htmlString = doc.documentElement.innerHTML;
    fs.writeFile(open_files, htmlString, (err) => { 
        if (err) {
            alert("An error ocurred updating the file" + err.message);
            console.log(err);
            return;
        }
        alert("The file has been succesfully saved");
    });
}
function saveHtmlFile ( ) { console . log ( "write file called" ) ; let iframe = document . getElementById ( "html_disp" ) ; let doc = iframe . contentDocument ? iframe . contentDocument : iframe . contentWindow . document ; let htmlString = doc . documentElement . innerHTML ; fs . writeFile ( open_files , htmlString , ( err ) => { if ( err ) { alert ( "An error ocurred updating the file" + err . message ) ; console . log ( err ) ; return ; } alert ( "The file has been succesfully saved" ) ; } ) ; }
Writes to htmlFile (for annotations)
Writes to htmlFile ( for annotations )
// Gets iframe doc and html // Writes html from iframe to file // writes to file that is open in iframe