Markdown preview regression: Markdown preview failed in edit project
This commit is contained in:
parent
fb28059ae7
commit
efeea87249
1
src/scripts/js/es6/common/api/init.js
Normal file
1
src/scripts/js/es6/common/api/init.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { thenMarkdownToHtml } from './markdown'
|
@ -128,15 +128,7 @@ script(type="text/javascript").
|
|||||||
$contentPreview = $('<div class="node-edit-form-md-preview" />').insertAfter($contentField);
|
$contentPreview = $('<div class="node-edit-form-md-preview" />').insertAfter($contentField);
|
||||||
|
|
||||||
function parseDescriptionContent(content) {
|
function parseDescriptionContent(content) {
|
||||||
|
pillar.api.thenMarkdownToHtml(content)
|
||||||
$.ajax({
|
|
||||||
url: "{{ url_for('nodes.preview_markdown')}}",
|
|
||||||
type: 'post',
|
|
||||||
data: {content: content},
|
|
||||||
headers: {"X-CSRFToken": csrf_token},
|
|
||||||
headers: {},
|
|
||||||
dataType: 'json'
|
|
||||||
})
|
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
$contentPreview.html(data.content);
|
$contentPreview.html(data.content);
|
||||||
})
|
})
|
||||||
|
@ -106,14 +106,7 @@ script(type="text/javascript").
|
|||||||
|
|
||||||
function parseDescriptionContent(content) {
|
function parseDescriptionContent(content) {
|
||||||
|
|
||||||
$.ajax({
|
pillar.api.thenMarkdownToHtml(content)
|
||||||
url: "{{ url_for('nodes.preview_markdown')}}",
|
|
||||||
type: 'post',
|
|
||||||
data: {content: content},
|
|
||||||
headers: {"X-CSRFToken": csrf_token},
|
|
||||||
headers: {},
|
|
||||||
dataType: 'json'
|
|
||||||
})
|
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
$contentPreview.html(data.content);
|
$contentPreview.html(data.content);
|
||||||
})
|
})
|
||||||
|
@ -140,14 +140,7 @@ script(type="text/javascript").
|
|||||||
|
|
||||||
function parseDescriptionContent(content) {
|
function parseDescriptionContent(content) {
|
||||||
|
|
||||||
$.ajax({
|
pillar.api.thenMarkdownToHtml(content)
|
||||||
url: "{{ url_for('nodes.preview_markdown')}}",
|
|
||||||
type: 'post',
|
|
||||||
data: {content: content},
|
|
||||||
headers: {"X-CSRFToken": csrf_token},
|
|
||||||
headers: {},
|
|
||||||
dataType: 'json'
|
|
||||||
})
|
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
$contentPreview.html(data.content);
|
$contentPreview.html(data.content);
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user