mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Notes: Add .underline for underlined text
Kinda resolves #499 but in a different way
This commit is contained in:
parent
e3312cb5f2
commit
46db744caf
3 changed files with 14 additions and 0 deletions
|
@ -48,6 +48,7 @@ class Note extends Postable
|
||||||
"acronym",
|
"acronym",
|
||||||
"blockquote",
|
"blockquote",
|
||||||
"cite",
|
"cite",
|
||||||
|
"span",
|
||||||
]);
|
]);
|
||||||
$config->set("HTML.AllowedAttributes", [
|
$config->set("HTML.AllowedAttributes", [
|
||||||
"table.summary",
|
"table.summary",
|
||||||
|
@ -59,6 +60,8 @@ class Note extends Postable
|
||||||
"img.style",
|
"img.style",
|
||||||
"div.style",
|
"div.style",
|
||||||
"div.title",
|
"div.title",
|
||||||
|
"span.class",
|
||||||
|
"p.class",
|
||||||
]);
|
]);
|
||||||
$config->set("CSS.AllowedProperties", [
|
$config->set("CSS.AllowedProperties", [
|
||||||
"float",
|
"float",
|
||||||
|
@ -68,6 +71,9 @@ class Note extends Postable
|
||||||
"max-width",
|
"max-width",
|
||||||
"font-weight",
|
"font-weight",
|
||||||
]);
|
]);
|
||||||
|
$config->set("Attr.AllowedClasses", [
|
||||||
|
"underline",
|
||||||
|
]);
|
||||||
|
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
return $purifier->purify($this->getRecord()->source);
|
return $purifier->purify($this->getRecord()->source);
|
||||||
|
|
|
@ -54,6 +54,10 @@
|
||||||
#userContent cite::before {
|
#userContent cite::before {
|
||||||
content: "— ";
|
content: "— ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#userContent .underline {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="container_gray" style="background: white; border-top: none;">
|
<div class="container_gray" style="background: white; border-top: none;">
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
#userContent cite::before {
|
#userContent cite::before {
|
||||||
content: "— ";
|
content: "— ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#userContent .underline {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<article id="userContent" style="margin: 10px 10px 0;">
|
<article id="userContent" style="margin: 10px 10px 0;">
|
||||||
|
|
Loading…
Reference in a new issue