flask-simplemde
flask-simplemde copied to clipboard
Font awesome & flask-simplemde compatibility
Hi,
I try to add some icons from FontAwesome in my Flask project, it's working, great. The problem is I use too flask-simplemde in this project. Both are not friends.
I think simple-mde retrieve icons from FontAwesome and some are not showing up..
This is happening only when I add the <script> tag for FontAwesome in my template file.
Thank you for help !
I tried to modify the __init__.py file of flask-simplemde according to official SimpleMDE documentation like this :
JS_LOAD_WITH_ID = """<script>
var simplemde = new SimpleMDE({
autoDownloadFontAwesome: undefined,
element: document.getElementById("%s")
});
</script>
"""
JS_LOAD_WITH_ID_IIFE = """<script>
(function () {
var simplemde = new SimpleMDE({
autoDownloadFontAwesome: undefined,
element: document.getElementById("%s")
});
})();
</script>
"""
It's only supposed to download font awesome if it's not already there.
It's not working for this option but for another it works like the toolbar: false which hides the toolbar.
I don't understand why autoDownloadFontAwesome option isn't working 🤔