City-of-Bloomington / uReport

Issue tracking and constituent relationship management system with an Open311 (GeoReport v2) endpoint designed for local governments
https://bloomington.in.gov/crm
GNU Affero General Public License v3.0
41 stars 29 forks source link

Markdown support for description and comments #299

Open inghamn opened 7 years ago

inghamn commented 7 years ago

We have quite a few descriptions and comments where users have formatted the plain text. However, when uReport displays these fields, the formatting is lost.

We should try to preserve any plain text formatting a user might have done on these fields. We might even go as far as supporting Markdown for these fields. But it could also be as simple as just displaying them with

 or some CSS control for the whitespace.

alexweissman commented 6 years ago

Definitely +1 for Markdown support. As it stands, submitted text is rendered as one monolithic paragraph even if I had added line breaks to create paragraphs. When I view the page source for an open ticket, it looks like whitespace is probably being preserved in the database, but since HTML largely ignores line breaks, it's rendered as a single paragraph.

If you're rendering server-side, I would suggest the Parsedown package. Otherwise, I've had luck with Showdown for client-side rendering in the past.