-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom style dropdown (without auto-generated list) #8758
Comments
Does this option help? $config->setOptions([
'style_formats' => [
[
'title' => 'Button',
'selector' => 'a',
'classes' => 'button'
]
],
'style_formats_autohide' => true
]); |
Following the example as in the tutorial this is what I get. If I add @kinglozzer's suggestion this is what I get. @JorisDebonnet Are you importing your entire frontend CSS file into the |
I haven't found a solution yet. I feel like I tried all suggestions... suppose I'll have to retry with a fresh installation and debug from there. Going on a vacation in 5 hours though, so I'll get some sleep and retry this when I get back. |
Are there any solutions yet? Hope your vacation was fine @JorisDebonnet and i hope you found a Solution ;) |
Hi @tobedamobe, I'm afraid I did not really find a solution. My
I ended up creating a separate |
I was able to achieve this by adding an arbitrary non-matched value for the following property: As per @derralf's config: |
Or just disable the import plugin |
I am using SilverStripe 4.2 at the moment.
I seems to be impossible to create a custom style dropdown without also automatically putting all classes from
content_css
into that dropdown. The documentation even explicitly says that:What? Why?
I want my website's CSS to be applied to the content in the editor, but I do not want all useless classes to be imported into that style dropdown. Most of those classes are for layout, header, menu, footer, ... there's no reason for those in the styles dropdown. I still want the full stylesheet to be applied though because some of those classes can actually be used in the content on some special pages, but I don't want them in the dropdown because they're too complicated (e.g. they need to be edited via html source).
In 3.x it used to be possible to use the
theme_advanced_styles
option to just have a simple custom list, but it seems to be ignored. I also tried withstyle_formats
but that only works if the auto-generated list also appears. I'll just expose those classes for now, but it doesn't look very professional...The text was updated successfully, but these errors were encountered: