mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 10:09:20 +02:00
Fix #923: Use same markdown widget for all content fields (rules, description, reports, notes, etc.)
This commit is contained in:
parent
8d29adf6be
commit
7850ca3e1c
12 changed files with 128 additions and 75 deletions
|
@ -191,5 +191,10 @@ class TextPreviewView(views.APIView):
|
|||
if "text" not in payload:
|
||||
return response.Response({"detail": "Invalid input"}, status=400)
|
||||
|
||||
data = {"rendered": utils.render_html(payload["text"], "text/markdown")}
|
||||
permissive = payload.get("permissive", False)
|
||||
data = {
|
||||
"rendered": utils.render_html(
|
||||
payload["text"], "text/markdown", permissive=permissive
|
||||
)
|
||||
}
|
||||
return response.Response(data, status=200)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue