Skip to content
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

Add Inline Inspector for the core/paragraph block to add classes to HTML-tags. #16907

Open
markvanwijnen opened this issue Aug 5, 2019 · 2 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.

Comments

@markvanwijnen
Copy link

markvanwijnen commented Aug 5, 2019

Inline Inspector

You have block-level styles. However there are multiple occasions where within the core/paragraph block you need to set class names (styles) to HTML tags. Now the only way to do that is by editing the HTML and adding it manually.

It would be nice if developers could hook into the core/paragraph block to add HTML-tag styles and for the editor to easily pick between the available styles.

For instance:

[{
    title: 'Button',
    tagName: 'a',
    className: 'button-link'
},{
  title: 'More',
  tagName: 'a',
  className: 'more-link'
}]

Next to the Document Inspector and Block Inspector, it would be nice if there would be an Inline Inspector. This will show options such as Styles and Advanced > Extra CSS class to add/edit classes to the current tag in the editor.

@markvanwijnen markvanwijnen changed the title Add styles to tags within the core/paragraph block. Add Inline Inspector for the core/paragraph block to add classes to HTML-tags. Aug 5, 2019
@swissspidy swissspidy added the [Type] Enhancement A suggestion for improvement. label Aug 9, 2019
@paaljoachim
Copy link
Contributor

Hey @markvanwijnen

Thanks for creating the issue!
A lot of time has passed.
Is this issue still relevant?

@skorasaurus skorasaurus added the [Block] Paragraph Affects the Paragraph Block label Dec 15, 2023
@skorasaurus
Copy link
Member

Came across this while looking for another paragraph issue; but yes, this issue is still relevant and open as of Gutenberg 17.4.

This might already be possible to build upon yourself using the https://github.com/WordPress/gutenberg/tree/2c247e2ae62b5d61dcdf5c634c13c7ccf0731b0d/packages/format-library/src using the format-library but not sure if there's a way to extend/hook into the format-library to do that.

@skorasaurus skorasaurus added the [Package] Format library /packages/format-library label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Paragraph Affects the Paragraph Block [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants