Gutenberg: Improved shortcuts for inserting headings

Created on 21 Jun 2018  路  14Comments  路  Source: WordPress/gutenberg

Currently the /heading shortcut adds a H2 by default, but the flow for creating other headings is cumbersome, you either have to start using your mouse, or jump back and forth using tabs.

For a good direct flow (for those who like commands over hashtags) would be to keep typing, /heading3 (a bit wordy/convoluted) or /h3 (quick and easy) for example, although this would mean we need some way to introduce multiple shortcuts per block with the ability to tie them to attributes of that block, possibly a bit much for the first iteration, but definitely enhancements I'd love to see moving forward.

Accessibility (a11y) Needs Dev [Block] Heading [Feature] Blocks [Feature] Inserter [Type] Enhancement

Most helpful comment

The keyboard shortcuts for assigning heading tags should preferably be the same as other document editors i.e Ctrl+Alt+1/2/3 or Alt+1/2/3.

All 14 comments

/h3 would be pretty neat.

The markdown ### shortcuts work for this, but they aren't very discoverable.

Exactly, they're not and once you start with the flow of using slash-commands it's awkward to jump back to other shortcuts from experience, it just feels natural to start off a new line with a "command over a secret string".

Thank you for picking this up @Clorith It's a great feature in the current editor not to have to change controls to a mouse to convert a paragraph to a heading. The shortcuts would make it par with the old editor and help with the transition, as people won't expect that 'their' keyboard short cuts don't work anymore.
screen shot 2018-06-28 at 9 14 20 am
It would be great if they can be 'replaced' by /h2 /h3

Noting that there's an old PR that adds some shortcuts for headings. Not sure if that's something we can get rolling again as it's fairly out-of-date. I may have a look at it later this week or next week if I can.

https://github.com/WordPress/gutenberg/pull/4436

Thank you all for thinking through this. I opened a duplicate on this topic (#10018) when I couldn't find this relevant post.

TL;DR: A blind user that uses these shortcuts in the Classic editor requested that something comparable be added to Gutenberg.

The keyboard shortcuts for assigning heading tags should preferably be the same as other document editors i.e Ctrl+Alt+1/2/3 or Alt+1/2/3.

Would love to see CTRL+ALT+2 to convert to h2!

These shortcuts are available via EditorsKit plugin:

Screen Shot 2020-06-03 at 6 00 55 PM

It鈥檚 been really long and yet we can鈥檛 change Headings with keyboard shortcuts. I鈥檝e stopped writing articles in the Block editor entirely. It鈥檚 great for creating complex pages and layouts but terrible for writing.

In which update will this change for Headings land? The linked PR shows 9.4 but that鈥檚 already out?

@uncertainquark 9.4 isn't out yet (the current plugin version is 9.2.2鈥攈ttps://wordpress.org/plugins/gutenberg/).

Unfortunately this change was merged just to late for 9.3, which will be release tomorrow. It'll be in 9.4, which should be released on the 18th November.

Nov 18 isn鈥檛 too late. :)
I'll get the update automatically, right? I鈥檓 using Wordpress.com.

Was this page helpful?
0 / 5 - 0 ratings