Closed ThomasRoest closed 9 years ago
There's an example in the docs under exportFile([filename],[type])
But to slightly modify it to your use case:
syncWithServerBtn.onclick = function () {
var theMarkdown = editor.exportFile();
var theHtml = editor.exportFile(null, 'html');
saveToServerAjaxCall('/save', {markdown: theMarkdown, html: theHtml}, function () {
console.log('Markdown and HTML was saved to the database.');
});
}
Hi,
How can I save the markdown input to the database, along with the generated html? I need the orignal markdown input as the user generated content is editable.
thanks