Issue
wagtail RichTextField is not showing the features I gave (bold, italic, etc..) on the wagtail admin page edit. How can I add that? am I missing something? I also tried with
admin.FieldPnale("banner_subtitle")
which also did not work for me.
HomePage
class HomePage(Page):
template = "home/home_page.html"
banner_title = models.CharField(max_length=100, blank=False, null=True)
max_count = 1
banner_subtitle = RichTextField(features=['bold', 'italic'])
banner_image = models.ForeignKey(
to="wagtailimages.Image",
null=True,
blank=False,
on_delete=models.SET_NULL,
related_name="+"
)
banner_cta = models.ForeignKey(
to="wagtailcore.Page",
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name="+"
)
content_panels = Page.content_panels + [
FieldPanel("banner_title"),
FieldPanel("banner_subtitle"),
ImageChooserPanel("banner_image"),
PageChooserPanel("banner_cta"),
]
pip freeze output
anyascii==0.3.1
asgiref==3.5.2
beautifulsoup4==4.11.1
certifi==2022.9.14
charset-normalizer==2.1.1
Django==4.1.1
django-filter==22.1
django-modelcluster==6.0
django-permissionedforms==0.1
django-taggit==3.0.0
django-treebeard==4.5.1
djangorestframework==3.14.0
draftjs-exporter==2.1.7
et-xmlfile==1.1.0
html5lib==1.1
idna==3.4
l18n==2021.3
openpyxl==3.0.10
Pillow==9.2.0
pytz==2022.2.1
requests==2.28.1
six==1.16.0
soupsieve==2.3.2.post1
sqlparse==0.4.2
tablib==3.2.1
telepath==0.3
urllib3==1.26.12
wagtail==4.0.1
webencodings==0.5.1
Willow==1.4.1
xlrd==2.0.1
XlsxWriter==3.0.3
xlwt==1.3.0
wagtail admin edit page
Solution
The /
shortcut is only used for inserting block-level elements such as images. To insert bold or italic text, select some existing text and choose bold or italic from the toolbar, or use the Ctrl+B or Ctrl+I keyboard shortcut.
Answered By - gasman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.