Would this be a sensible way to apply CSS styles to editors? I've found that checking the stylesheets box in the grid datatype does not apply styles to all editors only the RTE. Or is there a better way?
However it also applies the CSS to the entire back office which is messing up the way it displays. What is the recommended route to apply styles to editors?
Render content only in backend
Is it possible to render something, only in the backend?
Like "if (isInBackend) {}" or something like that?
var isInBackend = Request.Url.ToString().Contains("GetPartialViewResultAsHtmlForEditor");
via https://twitter.com/fraabye/status/606359708786675712
Or
Lecoati.LeBlender.Extension.Helper.IsFrontEnd()
Thanks Antoine!
Would this be a sensible way to apply CSS styles to editors? I've found that checking the stylesheets box in the grid datatype does not apply styles to all editors only the RTE. Or is there a better way?
if(!Lecoati.LeBlender.Extension.Helper.IsFrontEnd()){ }
If I apply CSS to one editor it applies it to all editors used:
However it also applies the CSS to the entire back office which is messing up the way it displays. What is the recommended route to apply styles to editors?
is working on a reply...