WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 23 months ago

#42324 new enhancement

Extending the use of the Text widget by adding heading drop down and alignment icons.

Reported by: paaljoachim Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: Cc:

Description

When the text widget was created it left out adding media (which has now been added for 4.9) but it does still not include adding a heading or alignment by clicking a button.

To make the text widget even more useful it would be nice to also include:

  • Heading
  • Alignment

These are typical features from TinyMCE that would improve the text widget.

Attachments (3)

EDIT-heading-alignment-text-widget-with-gallery.jpg (36.3 KB) - added by paaljoachim 2 years ago.
Adding the heading drop down and alignment icons
EDIT-Heading-alignment-text-widget-with-image-audio-678x1024.jpg (49.5 KB) - added by paaljoachim 2 years ago.
Adding the heading drop down and alignment icons - example 2
Edit-shorter-paragraph-drop-down-text-widget-with-gallery.jpg (36.4 KB) - added by paaljoachim 2 years ago.
A shorter heading drop down to save space.

Download all attachments as: .zip

Change History (13)

#1 @melchoyce
2 years ago

Note: Deleted attachments per @paaljoachim's request so he could upload some corrections.

@paaljoachim
2 years ago

Adding the heading drop down and alignment icons

@paaljoachim
2 years ago

Adding the heading drop down and alignment icons - example 2

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


2 years ago

This ticket was mentioned in Slack in #core-customize by paaljoachim. View the logs.


2 years ago

#4 @paaljoachim
2 years ago

If the goal of the text widget is to make it easier to add styled text then adding p, h1, h2, h3, h4 (perhaps a shorter version then writing out the word Paragraph and Heading 1, Heading 2 etc) as well as alignment is a natural part of it.

Standard styling in TinyMCE is:

  • Heading.
  • Alignment.
  • Linking.
  • Bold/italic etc.
  • List.
  • Adding media.

Leaving out essentials such as heading and alignment does not make the text widget as user friendly as it should be.
As mentioned if the problem is the width of the tinymce bar in the widget then just shorten down the heading drop down to only show the tags.

@paaljoachim
2 years ago

A shorter heading drop down to save space.

This ticket was mentioned in Slack in #core by paaljoachim. View the logs.


2 years ago

This ticket was mentioned in Slack in #core-customize by paaljoachim. View the logs.


23 months ago

#7 @celloexpressions
23 months ago

I would definitely +1 adding headings UI to the text widget (even if we didn't include media there). However, the alignment buttons do not make sense here (and there's a desire to remove them from the main editor). In most cases users would really want more flexibility in where widgets/blocks are placed in the context of the site.

#8 @alexvorn2
23 months ago

I wanted the Text Widget to have fullscreen option, but my ticket was closed:
#42245
So I think that option would be cool too, but westonruter decides everything here...

#9 @westonruter
23 months ago

@alexvorn2 It's not just my decision. See #35243 for where the decision for the limited set buttons appear in the Text widget's TinyMCE editor. If you want to have a fullscreen option, then a plugin can be written for it (as you did). Since widgets are usually in narrow widget areas (sidebars), it makes sense that the editor would likewise appear in a narrow widget form. We're targeting what the majority of users will find useful for what is included in core. Maybe more formatting buttons would be useful in core, but it is better to start with few than with many, as it's always easier to add than to take away. Plugins can add buttons for users that really need them. It's not about what would be cool, but rather again, it's about what would make the most sense for the majority of users. See the WordPress project philosophy. Otherwise, please do implement plugins for these features which you find useful, and if your plugins become popular and widely adopted, then by all means we can revisit adding them to core at that time.

#10 @ashokrd2013
23 months ago

@westonruter & @paaljoachim It will be good if Alignment option is provided but for Heading option, I am not in favor because it affects SEO like page have multiple H1 tags etc...

Note: See TracTickets for help on using tickets.