-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Setting a class and/or ID for selections (elements) within a block #7143
Comments
Related: #4658 |
Also related #7131 |
@hansschuijff Is there a specific action you'd propose at this point? |
Hi Daniel, no, not a specific action, I'm not a developer of Gutenberg. What I would like here is some sort of interface to add a class (or id?) to a text-selection or element within a block. It might translate in a span-tag being wrapped, or something like that in the html. Also, when added, it probably needs some marking to make it's existence visible. It would allow for themes to offer standardized styling, while allowing users to add this styling without having to code html. It's just an addition to the point that a block is not the smallest editable unit and gutenberg will probably need some provision for seperate words or other parts of a block to be style-edited. One can add styles like the del-tag or sub-/superscript and such, but also adding classes is a frequently suggested way to style within the control of a theme's or plugin's stylesheet. Ofcourse, if it's worth the trouble is not for me to decide. Hope this helps. |
@mtias, @iseulde - is it something that could be implemented using inline tokens? |
This seems like a duplicate of: #4658 as far as I can tell. @hansschuijff specifies a particular solution (wrapping the words with a span and adding a custom id or class) but that seems to be functionally the purpose of 4658. |
Is your feature request related to a problem? Please describe.
Somtimes content editors need the ability to change the appearance of parts of a block (esp. paragraphs) and classes and id's enable the theme to facilitate that in a structured manner.
Describe the solution you'd like
At this point Gutenberg's interface allows for a custom class to be added by the content-editor on a block-level. IRL classes would probably be needed sometimes on parts of a block, especially on paragraph type-blocks. It allows for specific theme-related controls on presentation of part of a paragraph, without having to result to coding in the HTML of the block.
Describe alternatives you've considered
Any solution that doesn't force users to code the HTML theirselfs.
The text was updated successfully, but these errors were encountered: