1
0
mirror of https://github.com/flarum/core.git synced 2025-07-12 12:26:23 +02:00

Live preview of post editing/replying thanks to TextFormatter 👏

This commit is contained in:
Toby Zerner
2015-07-22 16:05:00 +09:30
parent a0fe68272c
commit 017c258e46
14 changed files with 130 additions and 26 deletions

View File

@ -160,11 +160,17 @@ abstract class ClientAction extends HtmlAction
*/
protected function addCustomizations(AssetManager $assets)
{
foreach ($this->getLessVariables() as $name => $value) {
$assets->addLess("@$name: $value;");
}
$assets->addLess(function () {
$less = '';
$assets->addLess($this->settings->get('custom_less'));
foreach ($this->getLessVariables() as $name => $value) {
$less .= "@$name: $value;";
}
$less .= $this->settings->get('custom_less');
return $less;
});
}
/**