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

Improved shortcuts for inserting headings #7438

Closed
Clorith opened this issue Jun 21, 2018 · 14 comments
Closed

Improved shortcuts for inserting headings #7438

Clorith opened this issue Jun 21, 2018 · 14 comments
Labels
[Block] Heading Affects the Headings Block [Feature] Blocks Overall functionality of blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@Clorith
Copy link
Member

Clorith commented Jun 21, 2018

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.

@danielbachhuber danielbachhuber added the [Type] Enhancement A suggestion for improvement. label Jun 22, 2018
@danielbachhuber
Copy link
Member

/h3 would be pretty neat.

@TimothyBJacobs
Copy link
Member

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

@Clorith
Copy link
Member Author

Clorith commented Jun 22, 2018

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".

@bph
Copy link
Contributor

bph commented Jun 28, 2018

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

@mtias mtias added [Feature] Blocks Overall functionality of blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Jul 19, 2018
@sarahmonster sarahmonster mentioned this issue Jul 26, 2018
7 tasks
@talldan
Copy link
Contributor

talldan commented Aug 15, 2018

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.

#4436

@jessestu
Copy link

jessestu commented Sep 19, 2018

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.

@sarahmonster sarahmonster added [Block] Heading Affects the Headings Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Oct 26, 2018
@moonmehta
Copy link

moonmehta commented May 23, 2019

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.

@githubuser441
Copy link

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

@talldan talldan added the Needs Dev Ready for, and needs developer efforts label Jun 3, 2020
@phpbits
Copy link
Contributor

phpbits commented Jun 3, 2020

These shortcuts are available via EditorsKit plugin:

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

@moonmehta
Copy link

moonmehta commented Nov 3, 2020

It’s been really long and yet we can’t change Headings with keyboard shortcuts. I’ve stopped writing articles in the Block editor entirely. It’s great for creating complex pages and layouts but terrible for writing.

@talldan
Copy link
Contributor

talldan commented Nov 3, 2020

Fixed by #26597.

@moonmehta
Copy link

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

@talldan
Copy link
Contributor

talldan commented Nov 3, 2020

@uncertainquark 9.4 isn't out yet (the current plugin version is 9.2.2—https://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.

@moonmehta
Copy link

Nov 18 isn’t too late. :)
I'll get the update automatically, right? I’m using Wordpress.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Feature] Blocks Overall functionality of blocks [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests