Markdown preview regression: Markdown preview failed in edit project

This commit is contained in:
Tobias Johansson 2018-12-18 17:37:25 +01:00
parent fb28059ae7
commit efeea87249
4 changed files with 4 additions and 25 deletions

View File

@ -0,0 +1 @@
export { thenMarkdownToHtml } from './markdown'

View File

@ -128,15 +128,7 @@ script(type="text/javascript").
$contentPreview = $('<div class="node-edit-form-md-preview" />').insertAfter($contentField);
function parseDescriptionContent(content) {
$.ajax({
url: "{{ url_for('nodes.preview_markdown')}}",
type: 'post',
data: {content: content},
headers: {"X-CSRFToken": csrf_token},
headers: {},
dataType: 'json'
})
pillar.api.thenMarkdownToHtml(content)
.done(function (data) {
$contentPreview.html(data.content);
})

View File

@ -106,14 +106,7 @@ script(type="text/javascript").
function parseDescriptionContent(content) {
$.ajax({
url: "{{ url_for('nodes.preview_markdown')}}",
type: 'post',
data: {content: content},
headers: {"X-CSRFToken": csrf_token},
headers: {},
dataType: 'json'
})
pillar.api.thenMarkdownToHtml(content)
.done(function (data) {
$contentPreview.html(data.content);
})

View File

@ -140,14 +140,7 @@ script(type="text/javascript").
function parseDescriptionContent(content) {
$.ajax({
url: "{{ url_for('nodes.preview_markdown')}}",
type: 'post',
data: {content: content},
headers: {"X-CSRFToken": csrf_token},
headers: {},
dataType: 'json'
})
pillar.api.thenMarkdownToHtml(content)
.done(function (data) {
$contentPreview.html(data.content);
})