Questions tagged [django-markdownx]

A Django package that is used to store markdown text, and render forms accordingly.

Documentation can be found at https://neutronx.github.io/django-markdownx/

9 questions
4
votes
1 answer

How to truncate content for Mdeditor (content as markdownx) - Django

I installed Mdeditor and everything works fine. My problem is when I want to truncate the content of my BlogPost in template and this is how it looks. This is my model blog/models.py class BlogPost(models.Model): # blogpost_set -> queryset # id…
Dragos Neata
  • 153
  • 7
4
votes
1 answer

Django Markdownx Trouble

I am having trouble with markdown on my Django application. I am writing a blog from a tutorial, and want markdown in my posts. I installed Markdownx for Django, and it almost works. I have issues when it comes to code blocks. The markdown looks…
ChairMane
  • 55
  • 6
2
votes
1 answer

Django model does not recognize MarkdownxFormField field

I am trying to add markdownx support to my model, which will enable preview editing from the admin panel. However, once i change my content field from models.FileField to MarkdownXFromField() django just deletes the content field when migrating and…
1
vote
2 answers

Django render admin panel with markdown fields

I am having trouble with markdown on my Django application. I am writing an admin panel and want to use the markdown field. I did everything that is needed to install it: my settings: INSTALLED_APPS = [ 'django.contrib.staticfiles', …
harveeey
  • 41
  • 7
1
vote
0 answers

Creating a Python HTML code snippet with pygments/python-markdown/django-markdownx

What is the correct way of creating a HTML code snippet with pygments / python-markdown / django-markdownx? Basically, I am trying to make it look like the code blocks in the official Python documentation:…
PythonSherpa
  • 2,560
  • 3
  • 19
  • 40
1
vote
0 answers

I have problem when i import Django-Markdownx

i have problem when i import markdownx. i installed Markdownx for Django, and add in url. and i want to in models.py, but it has problem. problem is.. (Import 'markdownx.models' could not be resolved Pylance(reportMissingImports) [3, 6]) And my…
1
vote
0 answers

hardcoded url issue when drag & drop images with django-markdownx through S3

My website works perfectly fine with django-markdownx, unless I upload images. When I drag and drop image on markdownx form, auto generated image url is added in form like below: As you see, image is shown just fine. My storage is AWS s3, and I'm…
harryghgim
  • 1,340
  • 4
  • 12
  • 33
1
vote
2 answers

django application using markdown and cloudinary

I am trying to make a django application using django-markdownx and dj3-cloudinary-storage together. So one of the features of django-markdownx is that you can drag and drop image in the markdown field and it saves that image and gives back the path…
1
vote
0 answers

Managing image size in django-markdownx

Is there a way to apply CSS on the images I upload with django-markdownx? Or basically any way to dynamically adjust the size of the images posted inline with text in Django-base blog website? I've tried all the regular ways: