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

Need of TextColor for inline formatting (single words/characters) #6080

Closed
burnuser opened this issue Apr 9, 2018 · 20 comments
Closed

Need of TextColor for inline formatting (single words/characters) #6080

burnuser opened this issue Apr 9, 2018 · 20 comments
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.

Comments

@burnuser
Copy link

burnuser commented Apr 9, 2018

In the moment, text color is a formatting option which can only used for a whole paragraph.

For myself I used text color many times, but only to emphasize single words or characters for special attention, mark as changed, mark as different, ...
(But I never used it for a whole paragraph.)

As you integrated text color in formatting of paragraphs, you agree, that text color is a useful formatting tool. So I suggest, to make text color an inline formatting option like Bold and Italic (at least for Paragraph, List and Quote blocks) instead or additional to the existing Paragraph block option.

@danielbachhuber danielbachhuber added [Type] Enhancement A suggestion for improvement. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later labels Apr 10, 2018
@danielbachhuber
Copy link
Member

Hi @burnuser,

Thanks for the suggestion! This sounds like a great idea for a plugin to me.

@aristath
Copy link
Member

@danielbachhuber this is already possible right now in WordPress with the existing post editor.
Shouldn't Gutenberg at the very least make sure that no existing core capabilities are removed?

@danielbachhuber danielbachhuber added the Needs Design Feedback Needs general design feedback. label Apr 10, 2018
@danielbachhuber
Copy link
Member

this is already possible right now in WordPress with the existing post editor.

Ah, you are correct:

image

Shouldn't Gutenberg at the very least make sure that no existing core capabilities are removed?

Gutenberg won't totally replicate the Classic Editor. However, the breaking changes should be documented at the very least. See #4186 #4190

Flagging this as Needs Design Feedback to verify text color isn't a button we want to add to the standard text toolbar. I'd suspect not, but I'll make sure there's a second opinion.

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Apr 10, 2018

It should be noted that <span> tags, as well as <code>, <kbd>, <time>, <abbr>, and various other inline HTML tags are allowed in Paragraph, List, and Quote blocks, so you can add inline formatting manually using the "Edit as HTML" setting.

However, Classic blocks containing paragraphs, lists, and blockquotes with these inner formatting options have them removed when the "Convert to Blocks" setting is used. See #6102.

@karmatosed
Copy link
Member

I think this could be a good option but it would have to for me reuse the background and text color settings, not add new. Maybe it's when highlighted those then apply to the highlighted text.

@karmatosed karmatosed added Needs Design Needs design efforts. and removed Needs Design Feedback Needs general design feedback. labels Apr 10, 2018
@ZebulanStanphill
Copy link
Member

@karmatosed That is an interesting idea. The biggest issue I see with that approach is showing the user how the control acts differently depending on whether you have anything selected or not, in addition to the fact that no other block inspector option acts differently depending upon whether you have certain content within a block selected or not.

I just came up with my own idea. Why not add a 3rd tab to the default sidebar for inline formatting of the current selection? Here is a quick mockup I made:

image

@karmatosed karmatosed self-assigned this Apr 24, 2018
@karmatosed
Copy link
Member

@SuperGeniusZeb interesting idea but I think adding a tab just for this probably isn't the simplest route. I think simply have when you highlight a section of text the 'text color' allows you to change that and background allows you to also change that as long as it's highlighted. We may need to explore how discoverable this is. If it's not discoverable we can add a section to the 'Color Settings' over adding a new tab to the top level.

colorcombo2

@karmatosed karmatosed added Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement. and removed Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. labels Apr 24, 2018
@karmatosed karmatosed removed their assignment Jul 15, 2018
@mtias mtias added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Jul 19, 2018
@mcsf mcsf added the [Feature] Extensibility The ability to extend blocks or the editing experience label Jul 19, 2018
@gziolo
Copy link
Member

gziolo commented Aug 14, 2018

It looks like this is something that could be optionally integrated when #4658 is implemented. @iseulde, actually it could be good for dogfooding to combine those two issues into one PR.

@karmatosed
Copy link
Member

@gziolo that would be great. This really does seem like something people want and I would say it's a good to functionality to look into.

@GlennMartin1
Copy link

Consider that the paragraph block will be the most common block.

Hence, we need a very functional paragraph block.

In a similar vein, it's impossible to specify a different size for select text within a block.

@RayWaldo
Copy link

I rather like Gutenberg overall.

I have been using it for a week or so and the block functions are a true advancement. I understand that the present iteration is not the final product. I have been "limping" along trying to acquaint myself with it.

However, I will dislike Gutenberg greatly if most core functions of the existing editor are dropped. ESPECIALLY if the use of G. will REPLACE or eliminate inline formatting in existing posts when re-edited using G.
Gutenberg should be a step forward - not 5 steps back, as would be the case if G. would require the use of HTML tags to do what is in the core now.
I use the text color formatting regularly and do not want it eliminated. Also, there is a downside to adding any plugin - so that should not be the response. Most of us are already using more plugins than we really want.

@jcklpe
Copy link

jcklpe commented Sep 22, 2018

@RayWaldo This issue is being worked on here #4658 Please chime in and let the devs know that this is an important feature. To me, it's the single largest feature still missing from Gutenberg.

@RhysMcW
Copy link

RhysMcW commented Oct 25, 2018

I agree with @RayWaldo comment about liking Gutenberg overall BUT this is pretty much a "deal breaker" for me. I've just recently finished converting a few sites from Joomla to Wordpress as the users that manage the sites (local clubs) find Wordpress easier.
When I saw the notice on one of the sites dashboard about Gutenberg and the option to try it I figured why not.
I didn't even get one page done as being able to highlight a word or few within a paragraph and set a colour for it is pretty key...
One specific club page has instructions on and since we made certain words colourful we've had significantly fewer errors and queries from club members, this would prove a huge step backwards if this was unavailable in the future.
After having mentioned this issue to some of the site "admins" a few have already asked if we can switch back to Joomla. I've tried to placate them for now but if Wordpress 5.0 with Gutenberg arrived without this feature and more importantly if the existing pages a stripped of their colouring I'll probably be forced to move away from Wordpress for most of the sites I host...

@shoelaced
Copy link

Not being able to highlight and color text is annoying and would be worse for the average user. I see no issue with the entire paragraph changing color when nothing is highlighted, and when text is highlighted, only the highlighted text would be colored, using the same "Text Color" area in the sidebar for both. It seems to me this would be completely expected behavior.

Yes, text color is available in the "Classic" block, but:

  • It doesn't work with add_theme_support( 'editor-color-palette', $colors );.
  • It doesn't even work with the tiny_mce_before_init hook, which is often used to change the available colors in the current editor.
  • The "Classic" block doesn't let the user change the background color the way the paragraph block does.
  • Users would never think "Hm, I need to change the color of just one word, so perhaps I can use the Classic block," especially users who start using WP after Gutenberg and have no idea what the classic editor is.

Tiny usability things like this may seem small but they're a big deal to clients.

@ellatrix
Copy link
Member

The plugin Advanced Rich Text Tools will now add inline text and background color controls.

@RhysMcW
Copy link

RhysMcW commented Nov 14, 2018

The plugin Advanced Rich Text Tools will now add inline text and background color controls.

Thank you Ella, installed and did a very brief test and can now colour words as needed, yay

@gziolo
Copy link
Member

gziolo commented Nov 14, 2018

@iseulde, thanks for sharing this plugin. It uses new Format API to implement all format controls, including text color for individual characters and resolves the issue 🎉

@gziolo gziolo closed this as completed Nov 14, 2018
@jcklpe
Copy link

jcklpe commented Nov 14, 2018

Yay! Thank you @iseulde !

@RAIMUNDOS54
Copy link

RAIMUNDOS54 commented Jan 13, 2019

No option to change text color anywhere in Gutenberg. It happens with titles.

@phpbits
Copy link
Contributor

phpbits commented May 17, 2019

I've recently added text highlighting color options on EditorsKit plugin ( https://wordpress.org/plugins/block-options/ ) and I hope this solves this problem. Here's how my implementation works :

Gutenberg Highlighted Text and Background Colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests