Is there a way to grab the markdown as text? #261
Unanswered
altinaaaaaaa
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In an older project I used markdownify to convert a markdown field into text, which I could then do pythonic things with. For instance in my
models.py
I didto get just the first 150 characters of the body which was written in markdown. Does django-markdown-editor have something like this?
I found that it does have
from martor.utils import markdownify
however, using that on aMartorField()
does NOT remove the html tags and return only the text. Is there a way to grab the contents of aMartorField()
stripped of all html formatting?Beta Was this translation helpful? Give feedback.
All reactions