Problem/Motivation

Other than custom CSS classes, background color and background image do not appear for selection

Steps to reproduce

Install. Copy example.style_options.yml to style_options.style_options.yml and customize color scheme. Enable options plugin for selected paragraph types. Result: Custom Class selection appearing, others not.

Proposed resolution

Document necessary steps.

Comments

thomas.wardin created an issue.

johnpitcairn’s picture

Background color requires the spectrum jQuery library - that needs to be placed in a /libraries/spectrum/ directory.

You can manually add it to your libraries folder, but if using composer I'd recommend using the asset-packagist repository and oomphinc/composer-installers-extender to manage javascript libraries. Documentation for doing so can be found in the color_field module README.md file, which also uses spectrum. Note colour_field module is not required, just the spectrum js library.

justclint’s picture

Im having similar issue, but with the background_image. Ive copied the example yml into my module and the class and background_color options work but a field for adding background image never shows up.

This is background image settings in the yml file.

  bg_image:
    plugin: background_image
    label: Background Image
    method: css

Is there any additional steps needed to get the background image field to show?

Thanks!