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

Swtich to EasyMDE #76

Merged
merged 1 commit into from
Apr 18, 2021
Merged

Conversation

StefanUlbrich
Copy link
Contributor

SimpleMDE is no longer supported and as an open security issue.
EasyMDE is a maintianed fork.

This PR directly addresses #72

Additions:

  • Readme updated to reflect required font-awesome 5 and clearer instructions on how to get it.
  • isort failure removed
  • isort deprecated parameter removed (now standard behavior)

SimpleMDE is no longer supported and as an open security issue.
EasyMDE is a maintianed fork.
@jeriox
Copy link

jeriox commented Apr 10, 2021

@thijstriemstra will this be merged and is this project still maintained?

@StefanUlbrich
Copy link
Contributor Author

@jeriox , @thijstriemstra , I cannot merge without write access

@zerolab
Copy link
Member

zerolab commented Apr 12, 2021

Hey all,

Sorry for the delay and radio silence.
I will try to progress this in the coming day or two.

@@ -35,9 +35,23 @@ WAGTAILMARKDOWN_EXTENSIONS = ["toc", "sane_lists"]
### Installation
Alpha release is available on Pypi - https://pypi.org/project/wagtail-markdown/ - installable via `pip install wagtail-markdown`. It's not a production ready release.

The SimpleMDE editor uses FontAwesome for its widget icons. You can install [Wagtail FontAwesome](https://gitlab.com/alexgleason/wagtailfontawesome) via `pip install wagtailfontawesome`, or if you already have the stylesheet, add the following to a `wagtail_hooks` module in a registered app in your project:
The EasyMDE editor uses [FontAwesome 5](https://fontawesome.com/how-to-use/graphql-api/intro/getting-started) for its widget icons. You can get it with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to

Locally it GETs:

https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css, then https://maxcdn.bootstrapcdn.com/font-awesome/latest/fonts/fontawesome-webfont.woff2?v=4.7.0

regardless whether you use wagtailfontawesome, or the manual download + hook as described below.

https://github.com/Ionaru/easy-markdown-editor/#options-list states:

autoDownloadFontAwesome: If set to true, force downloads Font Awesome (used for icons). If set to false, prevents downloading. Defaults to undefined, which will intelligently check whether Font Awesome has already been included, then download accordingly.

So the best bet would be to initialize EasyMDE with autoDownloadFontAwesome: false

@zerolab zerolab merged commit 435865b into torchbox:master Apr 18, 2021
@zerolab
Copy link
Member

zerolab commented Apr 18, 2021

Thank you for this @StefanUlbrich.

Made a few tweaks around FontAwesome autodownload and merged it. Turns out SimpleMDE was doing the same autodownload thing - https://github.com/sparksuite/simplemde-markdown-editor/blob/master/src/js/simplemde.js#L1274-L1297 so the wagtailfontawesome dependency was erroneous

This was referenced Apr 19, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants