Closed ghord closed 7 years ago
Sample async implementation for preview event:
$("#text-editor").markdown({ onPreview: function (e, previewContainer) { $.ajax({ method: "POST", url: "/news/preview", data: { text: e.getContent() } }) .then(function (result) { previewContainer.html(result); }) //return placeholder string. It will be replaced after successfull ajax call return "Loading preview..."; } })
thanks @ghord
Sample async implementation for preview event: