Reputation: 47
I am using Wagtail CMS to build a website. I now want to embed a link with image into a paragraph. As I use the wagtail rich text editor I am wondering if there is any way to use inline html inside the rich text editor.
Greetings
Upvotes: 0
Views: 1962
Reputation: 731
You can add the 'media'
option in feature list of Richtextfield.
body = RichTextField(features=['h2', 'h3', 'bold', 'italic', 'link', ..., 'media'])
Or if you have to use this embed feature many times then you can define a features list in constants.py
file as say
RICHTEXT_FEATURES=['h2', 'h3', 'bold', 'italic', 'link', ..., 'media']
Then do
from constants import RICHTEXT_FEATURES
...
body = RichTextField(features=RICHTEXT_FEATURES)
in your models.py
file.
This will enable you to embed content in the richtext panel.
Refer to the documentations here and here for more details.
Upvotes: 2