Skip to content

Add a no style option to the caption toolbar #47813

Open

Description

What problem does this address?

If a theme adds CSS to customize captions, the options in the caption toolbar does not reflect this.
For example if the caption is already italic, choosing the italic option does nothing, and you also can not turn off the italic style.

In this core trac ticket for Twenty Seventeen, the reporter writes:

If you add a caption to an image in the Image Block, the caption is in italics on the front end but not in the editor. This means that if you select the caption text you have the option to make it italic (which has no change on the front end) but not the option to deselect italics.

https://core.trac.wordpress.org/ticket/56747

What is your proposed solution?

Add an option to the caption toolbar that clears the theme styling (overrides it).
Or, allow themes to use a filter to make any styling option in the toolbar enabled by default. Deselecting the option should then remove the style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Block] GalleryAffects the Gallery Block - used to display groups of images[Block] ImageAffects the Image Block[Block] TableAffects the Table Block[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions