Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font awesome & flask-simplemde compatibility #3

Open
ghost opened this issue Jun 1, 2020 · 1 comment
Open

Font awesome & flask-simplemde compatibility #3

ghost opened this issue Jun 1, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 1, 2020

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..

Screenshot 2020-06-01 at 16 14 48

This is happening only when I add the <script> tag for FontAwesome in my template file.

Thank you for help !

@ghost
Copy link
Author

ghost commented Jun 1, 2020

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants