Roundup Tracker - Issues

Message6814

Author rouilj
Recipients ThomasAH, ber, ezio.melotti, mschieder, ncoghlan, rouilj
Date 2019-11-10.23:51:19
Message-id <1573429879.9.0.150298715293.issue2550856@roundup.psfhosted.org>
In-reply-to
ThomasAH:

I noticed you mentioned the lack of preview mode.

Since the newly added rest interface can be extended,
maybe a javascript solution would work.

1) Add a button that takes the comment text (@note) and posts it to

     .../rest/@method/md2html

2) the rest/@method/md2html endpoint is a tracker local
  addition that calls local_replace and markdown to process
  the text like viewing it would do. It should take POSTed text
  and return (possibly json wrapped) html.

3) the javascript takes the returned html and inserts it into a
   <div id="preview"> </div> added to the issue.item.html template.
   Alternately it brings up an overlay on the page with the preview.

Another way to do it (without js) would be for a preview button to trigger a
"md-preview" action on the roundup side that does similar processing
to the @note field. Then returns a page with rendered text and the original
fields.

Thoughts?

-- rouilj
History
Date User Action Args
2019-11-10 23:51:19rouiljsetmessageid: <1573429879.9.0.150298715293.issue2550856@roundup.psfhosted.org>
2019-11-10 23:51:19rouiljsetrecipients: + rouilj, ber, ThomasAH, ezio.melotti, ncoghlan, mschieder
2019-11-10 23:51:19rouiljlinkissue2550856 messages
2019-11-10 23:51:19rouiljcreate