Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

contentEditable keyboard shortcuts

Is there any official list of keyboard shortcuts for browsers, that can be used in contentEditable div for text formatting?

I know three for Chrome (and maybe some other browsers): Ctrl+B, Ctrl+U, CTRL+I.

Where can I find this information? I've tried to find it, but unsuccessfully.

like image 830
Roman Konkin Avatar asked Mar 01 '26 01:03

Roman Konkin


1 Answers

Bit late :) but just in case...

It's a bit dense, but this precisely answers your question: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/editing_behavior.cc

TL;DR, there are a bunch of (honestly) kinda interesting and obscure things you can do, but in terms of the mainstream ^BIU is pretty much it.

(Aside - copying the entire relevant section of the code would turn this answer into quite the wall of text... I don't mind doing that if others think it's a good idea.)

like image 122
i336_ Avatar answered Mar 02 '26 14:03

i336_



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!