ContactEngineering / ce-ui

User interface of contact.engineering
https://contact.engineering
MIT License
0 stars 0 forks source link

Formatting Surface and Topography descriptions with Markdown #18

Open mcrot opened 5 years ago

mcrot commented 5 years ago

User Story

As a user, I want to be able to use basic formatting for the free-from description of topographies and surfaces.

Acceptance Criteria

For each topographies and surfaces it's possible to enter in the description field some markdown text with headlines and images and these descriptions are formatted automatically.

mcrot commented 5 years ago

These extensions look promising:

https://github.com/neutronX/django-markdownx https://github.com/agusmakmun/django-markdown-editor

I would give the first one the first try.

This one is very simple and does not provide a preview while editing:

https://github.com/svetlyak40wt/django-markdown2

mcrot commented 3 years ago

Besides the Django extensions there are also JS only markdown editors for on the client side which have a preview function. Examples:

https://simplemde.com/ https://github.com/bevacqua/woofmark https://github.com/inacho/bootstrap-markdown-editor

mcrot commented 3 years ago

We agreed that we should not allow to upload images in the description fields like the first django extension does.

This issue can be resolved in two steps:

  1. Interpreting description fields as markdown and display as HTML
  2. Include an editor with preview to give an impression how it looks like while editing.
mcrot commented 2 years ago

I'm just reading about descriptions in DOIs. As the descriptions here would also be used in DOIs we should either don't use any markdown (except of <br>, see datacite documentation for schema 4.2) or use an extra description for a published surface which is not necessarily the same as the surface's description.