mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Add preview button in the Forum
This commit is contained in:
@ -4,10 +4,12 @@
|
||||
{{ super() }}
|
||||
<script>
|
||||
function make_preview() {
|
||||
text = $("#id_content").val();
|
||||
console.log("Rendering text: " + text);
|
||||
$.ajax({
|
||||
url: "{{ url('api:api_markdown') }}",
|
||||
method: "GET",
|
||||
data: { text: $("#id_content").val() }
|
||||
method: "POST",
|
||||
data: { text: text, csrfmiddlewaretoken: "{{ csrf_token }}"}
|
||||
}).done(function (msg) {
|
||||
$("#preview").html(msg);
|
||||
});
|
||||
|
Reference in New Issue
Block a user