Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Custom styles for backend editor textareas
Hey there,
is there a way to do this?
Can I use styles-txp.css
in /themes for that purpose?
Or can I use a directive in config.php
to link to a custom css?
(As always, I feel like I did this before, but for the life of me I can’t remember how nor where I did it ,–)
Cheers!
-f
Offline
Re: Custom styles for backend editor textareas
See custom-example.css. If I recall correctly, the admin theme will load custom.css on its own if it’s in your admin theme’s assets/css folder. Phil’s put all manner of useful information in there.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Custom styles for backend editor textareas
Yes! I knew it was in there somewhere.
Danke Dir, Jakob!
Offline
Re: Custom styles for backend editor textareas
So, just to have this complete & in one place:
As proposed by Bloke right here #299719, the directive in config.php goes like this …
define('admin_custom_css', 'custom-funtoosh.css');
(In custom-example.css it is still define('admin_custom_css', true);
)
… and, as a quick example, say you want to add custom fonts to your textareas, this would do the trick, in textpattern/admin-themes/hive/assets/css/custom-funtoosh.css add sth. along the lines of:
@font-face {
font-family: 'funtoosh';
src: url('/relative/path/fonts/funtoosh.woff2') format('woff2');
}
#title, #body, #excerpt {
font-family: 'funtoosh', sans-serif;
}
Offline
Re: Custom styles for backend editor textareas
I think you can even just name your file custom.css
in the assets folder of your admin theme (either directly in hive or in one of your own) and it will automatically be detected without you having to add anything to config.php.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Custom styles for backend editor textareas
Jakob, that’s correct, as soon as a file named custom.css
is available in textpattern/admin-themes/hive/assets/css/ it is being used, no need to modify the config!
Offline