Notes: Add .underline for underlined text

Kinda resolves #499 but in a different way
This commit is contained in:
Ilya Prokopenko 2022-03-23 16:43:17 +03:00
parent e3312cb5f2
commit 46db744caf
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
3 changed files with 14 additions and 0 deletions

View file

@ -48,6 +48,7 @@ class Note extends Postable
"acronym",
"blockquote",
"cite",
"span",
]);
$config->set("HTML.AllowedAttributes", [
"table.summary",
@ -59,6 +60,8 @@ class Note extends Postable
"img.style",
"div.style",
"div.title",
"span.class",
"p.class",
]);
$config->set("CSS.AllowedProperties", [
"float",
@ -68,6 +71,9 @@ class Note extends Postable
"max-width",
"font-weight",
]);
$config->set("Attr.AllowedClasses", [
"underline",
]);
$purifier = new HTMLPurifier($config);
return $purifier->purify($this->getRecord()->source);

View file

@ -54,6 +54,10 @@
#userContent cite::before {
content: "— ";
}
#userContent .underline {
text-decoration: underline;
}
</style>
<div class="container_gray" style="background: white; border-top: none;">

View file

@ -33,6 +33,10 @@
#userContent cite::before {
content: "— ";
}
#userContent .underline {
text-decoration: underline;
}
</style>
<article id="userContent" style="margin: 10px 10px 0;">