comic / grand-challenge.org

A platform for end-to-end development of machine learning solutions in biomedical imaging
https://grand-challenge.org
Apache License 2.0
175 stars 50 forks source link

Summernote editor doesn't justify text properly #3294

Closed amickan closed 1 day ago

amickan commented 6 months ago

Describe the bug Our summernote editor for challenge pages doesn't correctly align text.

To Reproduce Steps to reproduce the behavior:

  1. Go to a challenge page and edit it, e.g.: https://demo.grand-challenge.org/demo/update/
  2. Select to justify the text with "justify full" (paragraph --> justify full)
  3. Safe the page
  4. The text is not justified.

Expected behavior The text should be justifed.

Additional context It turns out that if you use the editor for justify full <p align="justify“> is added to the html code, which is obsolete. If you change it to <p style="text-align: justify;“> everything works fine.

It looks like django-summernote is no longer maintained. Maybe it would make sense to switch to our markdown editor for challenge pages instead?

jmsmkn commented 6 months ago

Using MarkDown for pages has been on my mind for a while. I think it is nicer and you can use full html. However, taking the existing pages and putting them into the MarkDown editor will make them really difficult to modify. We could try adding pandoc to convert the HTML to MarkDown and seeing what the result is like, but for some pages it might be manual work (which given we have more than 2000 may be a problem).

I think if we were to modify this we would need to have an opt-in to MarkDown for existing pages, but new ones could be created with that setting being true.

jmsmkn commented 1 week ago

Along with the pages we also use summernote in:

A similar migration process would need to be followed for those.

jmsmkn commented 1 week ago

The markdown editor for pages should: