#5044 when editing the issue's description sent the html of it to the SSE server
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

file modified
+1
@@ -2190,6 +2190,7 @@ 

                              public=True, with_comments=False

                          ),

                          "priorities": issue.project.priorities,

+                         "content_updated": text2markdown(issue.content),

                      }

                  ),

              )

file modified
+1 -1
@@ -264,7 +264,7 @@ 

        }

      } else if (_f == 'content'){

        var field = $('#comment-0').parent().find('.comment_body');

-       field.html('<p>' + data.issue.content + '</p>');

+       field.html('<p>' + data.content_updated + '</p>');

      } else if (_f == 'milestone'){

        var field = $('#milestone_plain');

        var _url = _roadmap_url.replace('-123456789', data.issue.milestone);

Then in the JS we can display the nice version of the issue's
description live, instead of having to reload the page to see the
markdown rendered.

Fixes https://pagure.io/pagure/issue/5039

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Pull-Request has been merged by pingou

3 years ago