Commit 2b3548f8 authored by cynddl's avatar cynddl

Add a Markdown editor for article extracts

parent 95ca6ffb
......@@ -38,7 +38,6 @@
{% crispy form %}
</form>
</div>
</div>
......@@ -49,5 +48,16 @@
theme: "bootstrap"
});
$('.select2-container').width("auto");
var simplemde = new SimpleMDE({
element: $("#id_extracts")[0],
toolbar: ["bold", "italic", "strikethrough", "|", "heading", "quote", "link", "|", "side-by-side", "preview", "guide"],
spellChecker: false,
blockStyles: {
bold: "**",
italic: "_"
},
});
</script>
{{ form.media }}
{% endblock %}
......@@ -10,5 +10,9 @@ require('select2');
require('select2/dist/css/select2.css');
require('select2-bootstrap-theme/dist/select2-bootstrap.css');
// Markdown editor
global.SimpleMDE = require('simplemde');
require('simplemde/dist/simplemde.min.css')
// Local styles
import styles from './admin.css';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment