BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Improvement: Add Keyboard Shortcuts for Changing Paragraph Format

Open tpetrauskas opened this issue 10 years ago • 4 comments

During text formatting mouse is used more as it should. It would be way more productive to use keyboard shortcuts for that task.

Missed keyboard shortcuts for changing paragraph formatting:

  • Header 1
  • Header 2
  • Header 3
  • Paragraph
  • Block-quote
  • Code Block
  • Inline Code

tpetrauskas avatar Mar 26 '16 16:03 tpetrauskas

Just a suggestion, other key board shortcuts that would be nice are

[e]          switch to edit mode (especially useful when you scrolled all the way down on a long page and the edit button is all the way at the top of the page, extra points when edit mode starts at the location you scrolled to, instead of the top of the page)
[ctrl]+[s]   save and exit edit mode
[some key]   sync preview with current location of markdown editor
[ctrl]+[lmb] sync markdown editor with location (mouse click) of preview)

Just throwing this in as suggestion :)

fredericmohr avatar May 13 '16 08:05 fredericmohr

Since the headers can already be controlled via [ctrl]+[1-4], how difficult would it be to expand that to include paragraph, block quote, code block and inline code with keys [5-8]?

If it's a priority issue, is there anything I can do to help? I'm not a developer but I have had some contact with PHP and Lavarel, so if it's not too complicated and if someone could point me at the right location, I could give it a try. If it results in usable code, we can merge it.

fredericmohr avatar Feb 17 '17 18:02 fredericmohr

Seems the shortcuts for headers doesn't include Header Tiny which you would expect to be Control + 5?

stu177 avatar Mar 22 '17 10:03 stu177

As per the suggestion from @fredericmohr I've expanded the shortcuts across [Ctrl]+[1-9]. I've done this in both editors. Thanks @fredericmohr.

@stu177 I've altered the header shortcuts to match the formats dropdown. Ctrl+4 is now 'Header - Tiny'. Thanks for making me aware that tiny was not included.

I'll document the current shortcuts as part of sending out the next release (#452).

The work done here be in the next bugfix release, v0.17.4, due in the next couple of days.

ssddanbrown avatar Jul 27 '17 18:07 ssddanbrown