// Save a file in the FileSystem. function saveFile(filename, content) { filesystem.root.getFile(filename, {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) { // Update the file browser. listFiles(); // Clean out the form field. filenameInput.value = ”; contentTextArea.value = ”; // Show a saved message. messageBox.innerHTML = ‘File saved!’; }; fileWriter.onerror = function(e) { console.log(‘Write …
Continue reading “Building an HTML5 Text Editor with the FileSystem APIs”