Skip to content

Commit

Permalink
Make AlertBlock content richtext so phone numbers can be hotlinked
Browse files Browse the repository at this point in the history
  • Loading branch information
janbaykara committed Oct 4, 2022
1 parent 64f7c7f commit 9ac834f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion stopwatch/models/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class Meta:
template = 'stopwatch/components/alert.html'

heading = CharBlock()
content = TextBlock()
content = RichTextBlock(
features=['bold', 'italic', 'ol', 'ul', 'hr', 'link', 'document-link', ])


class LinksBlock(StructBlock):
Expand Down
4 changes: 2 additions & 2 deletions stopwatch/templates/stopwatch/components/alert.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% load static ckbootstrap_tags wagtailembeds_tags %}
{% load static ckbootstrap_tags wagtailembeds_tags wagtailcore_tags %}

<div class="mb-5">
<div class="bg-alert p-3">
<h3>{{self.heading}}</h3>

{{self.content}}
{{self.content|richtext}}
</div>
</div>

0 comments on commit 9ac834f

Please sign in to comment.