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

Setting a class and/or ID for selections (elements) within a block #7143

Closed
hansschuijff opened this issue Jun 5, 2018 · 7 comments
Closed
Labels
[Feature] Blocks Overall functionality of blocks

Comments

@hansschuijff
Copy link

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.

@chrisvanpatten
Copy link
Contributor

Related: #4658

@danielbachhuber
Copy link
Member

Also related #7131

@danielbachhuber danielbachhuber added [Status] Needs More Info Follow-up required in order to be actionable. [Feature] Blocks Overall functionality of blocks labels Jul 11, 2018
@danielbachhuber
Copy link
Member

@hansschuijff Is there a specific action you'd propose at this point?

@hansschuijff
Copy link
Author

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.

@gziolo
Copy link
Member

gziolo commented Aug 14, 2018

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.

@mtias, @iseulde - is it something that could be implemented using inline tokens?

@tofumatt tofumatt removed the [Status] Needs More Info Follow-up required in order to be actionable. label Sep 15, 2018
@jcklpe
Copy link

jcklpe commented Sep 22, 2018

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.

@gziolo
Copy link
Member

gziolo commented Sep 24, 2018

Yes, #4658 will make it possible. It’s in a very advanced stage of development led by @iseulde. Let’s close this one and follow up there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

No branches or pull requests

6 participants