Minor fixes

This commit is contained in:
Elia Bieri 2023-05-17 13:04:53 +02:00
parent e69004c1f2
commit 849e49c433
4 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<template>
<!-- eslint-disable vue/no-v-html -->
<div class="container-medium">
<div v-html="props.content.text"></div>
<div class="default-wagtail-rich-text" v-html="props.content.text"></div>
</div>
</template>

View File

@ -32,6 +32,11 @@ body {
margin-left: 24px;
}
.default-wagtail-rich-text ol {
list-style-type: decimal;
margin-left: 24px;
}
svg {
@apply fill-current;
}
@ -98,8 +103,7 @@ textarea {
}
.filter-blue-900 {
filter: invert(9%) sepia(38%) saturate(5684%) hue-rotate(200deg) brightness(95%)
contrast(105%);
filter: invert(9%) sepia(38%) saturate(5684%) hue-rotate(200deg) brightness(95%) contrast(105%);
}
}

View File

@ -1,8 +1,4 @@
DEFAULT_RICH_TEXT_FEATURES = [
"ul",
"bold",
"italic",
]
DEFAULT_RICH_TEXT_FEATURES = ["ul", "bold", "italic", "h2"]
# ids for cypress test data
ADMIN_USER_ID = -1

View File

@ -6,6 +6,7 @@ from wagtail.admin.panels import FieldPanel, PageChooserPanel
from wagtail.fields import RichTextField
from wagtail.models import Page
from vbv_lernwelt.core.constants import DEFAULT_RICH_TEXT_FEATURES
from vbv_lernwelt.core.model_utils import find_available_slug
from vbv_lernwelt.course.models import CourseBasePage, CoursePage
@ -306,9 +307,12 @@ class LearningContentTest(LearningContent):
class LearningContentRichText(LearningContent):
text = RichTextField(blank=True)
text = RichTextField(blank=True, features=DEFAULT_RICH_TEXT_FEATURES)
parent_page_types = ["learnpath.Circle"]
serialize_field_names = LearningContent.serialize_field_names + [
"text",
]
subpage_types = []
content_panels = LearningContent.content_panels + [
FieldPanel("text", classname="Text"),