core: edit buttons on MarkdownInupt

This commit is contained in:
Antoine Bartuccio 2018-12-18 14:39:05 +01:00
parent 3b08603635
commit 55ff492ec8

View File

@ -39,6 +39,7 @@
}).done(function (msg) {
preview.innerHTML = msg;
});
return preview.innerHTML;
}
// Pretty markdown input
@ -46,10 +47,14 @@
element: document.getElementById("{{ widget.attrs.id }}"),
spellChecker: false,
previewRender: function(plainText, preview){ // Async method
customMarkdownParser(plainText, preview);
return preview.innerHTML;
}
return customMarkdownParser(plainText, preview);
},
showIcons: ["code", "table", "clean-block"]
});
// Change the behavior of the markdown guide button to use our page
$("[title='Markdown Guide']").each(function() {
$(this).prop("href", "/page/Aide_sur_la_syntaxe/");
});
</script>
</div>