Ticket #2698 (assigned enhancement)
markdown preview
Reported by: | shevski | Owned by: | toby |
---|---|---|---|
Priority: | minor | Milestone: | demo phase 4 |
Component: | ckan | Keywords: | demo-theme |
Cc: | Repository: | ckan | |
Theme: | none |
Description
for description / other fields with markdown support
Change History
comment:2 Changed 21 months ago by aron.carroll
- Owner changed from aron.carroll to toby
- Status changed from new to assigned
We need an api endpoint that can render a markdown string on submission.
- Client posts a string of text to the endpoint.
- Server responds with a 200, text/html response containing the rendered markdown.
- Server returns a 400 and empty body if the content is not valid markdown.
- Server returns a 500 and empty body if something else crashes.
Alternatively for better error handling we could use a JSON transport.
- Client posts a blob of json containing a "content" key with the markdown string.
- Server returns a 200 (application/json) and blob of json with a "content" key with the rendered markdown.
- Server returns a 400 (application/json) and blob of json with a "error" key containing a useful message for the user.
- Server returns a 500 (application/json) and blob of json with a "error" key containing a useful message for the user.
Note: See
TracTickets for help on using
tickets.
I think this would be really helpful/nice