Vue Comments: Comments ported to Vue + DnD fileupload
* Drag and drop files to comment editor to add a file attachment * Using Vue to render comments Since comments now has attachments we need to update the schemas ./manage.py maintenance replace_pillar_node_type_schemas
This commit is contained in:
17
src/scripts/js/es6/common/api/markdown.js
Normal file
17
src/scripts/js/es6/common/api/markdown.js
Normal file
@@ -0,0 +1,17 @@
|
||||
function thenMarkdownToHtml(markdown, attachments={}) {
|
||||
let data = JSON.stringify({
|
||||
content: markdown,
|
||||
attachments: attachments
|
||||
});
|
||||
return $.ajax({
|
||||
url: "/nodes/preview-markdown",
|
||||
type: 'POST',
|
||||
headers: {"X-CSRFToken": csrf_token},
|
||||
headers: {},
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
contentType: 'application/json; charset=UTF-8'
|
||||
})
|
||||
}
|
||||
|
||||
export { thenMarkdownToHtml }
|
Reference in New Issue
Block a user