mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-13 17:53:12 +00:00
call expand_db_html in the native rendering of RichTextBlock
This commit is contained in:
parent
f3a66d34af
commit
e223cac658
1 changed files with 4 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ from django.forms.utils import ErrorList
|
|||
import six
|
||||
|
||||
from wagtail.wagtailcore.utils import escape_script
|
||||
from wagtail.wagtailcore.rich_text import expand_db_html
|
||||
|
||||
# helpers for Javascript expression formatting
|
||||
|
||||
|
|
@ -299,6 +300,9 @@ class RichTextBlock(FieldBlock):
|
|||
from wagtail.wagtailcore.fields import RichTextArea
|
||||
super(RichTextBlock, self).__init__(CharField(widget=RichTextArea), **kwargs)
|
||||
|
||||
def render_basic(self, value):
|
||||
return mark_safe('<div class="rich-text">' + expand_db_html(value) + '</div>')
|
||||
|
||||
# =======
|
||||
# Chooser
|
||||
# =======
|
||||
|
|
|
|||
Loading…
Reference in a new issue