I am new using markdown. I tried to use the show_preview = False to implement preview using jQuery instead.
class PostForm(forms.ModelForm):
content = forms.CharField(widget=PagedownWidget(show_preview=False))
publish = forms.DateField(widget = forms.SelectDateWidget)
class Meta:
model = Post
fields = [
"title",
"content",
"image",
"draft",
"publish",
]
unfortunately, it throws an error:
line 9, in PostForm
content = forms.CharField(widget=PagedownWidget(show_preview=False))
TypeError: __init__() got an unexpected keyword argument 'show_preview'
I did look into the markdown files and could not find show_preview using except here:
4 <textarea {{ attrs|safe }}>{{ body }}</textarea>
5 </div>
6 {% if show_preview %}
7 <p class="wmd-preview-title">
8 <small>HTML Preview:</small>
I am running:
Django==2.2.6
django-markdown-deux==1.0.5
django-pagedown==2.0.3