Edit posts in original markdown syntax

This commit is contained in:
Mouse Reeve
2021-10-14 18:34:26 -07:00
parent 01911d3b23
commit af567ba05e
5 changed files with 33 additions and 2 deletions

View File

@ -76,6 +76,11 @@ class CreateStatus(View):
return redirect(request.headers.get("Referer", "/"))
status = form.save(commit=False)
# save the plain, unformatted version of the status for future editing
status.raw_content = status.content
if hasattr(status, "quote"):
status.raw_quote = status.quote
if not status.sensitive and status.content_warning:
# the cw text field remains populated when you click "remove"
status.content_warning = None