{"action":"created","issue":{"url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/361","labels_url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/361/labels{/name}","comments_url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/361/comments","events_url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/361/events","html_url":"https://github.com/OscarGodson/EpicEditor/issues/361","id":59128706,"number":361,"title":"saving the markdown input","user":{"login":"ThomasRoest","id":4428811,"avatar_url":"https://avatars.githubusercontent.com/u/4428811?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasRoest","html_url":"https://github.com/ThomasRoest","followers_url":"https://api.github.com/users/ThomasRoest/followers","following_url":"https://api.github.com/users/ThomasRoest/following{/other_user}","gists_url":"https://api.github.com/users/ThomasRoest/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasRoest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasRoest/subscriptions","organizations_url":"https://api.github.com/users/ThomasRoest/orgs","repos_url":"https://api.github.com/users/ThomasRoest/repos","events_url":"https://api.github.com/users/ThomasRoest/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasRoest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T19:30:41Z","updated_at":"2015-02-26T21:50:20Z","closed_at":null,"body":"Hi, \r\n\r\nHow can I save the markdown input to the database, along with the generated html?\r\nI need the orignal markdown input as the user generated content is editable. \r\n\r\nthanks\r\n"},"comment":{"url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/comments/76281667","html_url":"https://github.com/OscarGodson/EpicEditor/issues/361#issuecomment-76281667","issue_url":"https://api.github.com/repos/OscarGodson/EpicEditor/issues/361","id":76281667,"user":{"login":"OscarGodson","id":20615,"avatar_url":"https://avatars.githubusercontent.com/u/20615?v=3","gravatar_id":"","url":"https://api.github.com/users/OscarGodson","html_url":"https://github.com/OscarGodson","followers_url":"https://api.github.com/users/OscarGodson/followers","following_url":"https://api.github.com/users/OscarGodson/following{/other_user}","gists_url":"https://api.github.com/users/OscarGodson/gists{/gist_id}","starred_url":"https://api.github.com/users/OscarGodson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OscarGodson/subscriptions","organizations_url":"https://api.github.com/users/OscarGodson/orgs","repos_url":"https://api.github.com/users/OscarGodson/repos","events_url":"https://api.github.com/users/OscarGodson/events{/privacy}","received_events_url":"https://api.github.com/users/OscarGodson/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:50:20Z","updated_at":"2015-02-26T21:50:20Z","body":"There's an example in the docs under `exportFile([filename],[type])`\r\n\r\nBut to slightly modify it to your use case:\r\n\r\n```js\r\nsyncWithServerBtn.onclick = function () {\r\n  var theMarkdown = editor.exportFile();\r\n  var theHtml = editor.exportFile(null, 'html');\r\n  saveToServerAjaxCall('/save', {markdown: theMarkdown, html: theHtml}, function () {\r\n    console.log('Markdown and HTML was saved to the database.');\r\n  });\r\n}\r\n```"}}