Open DerIshmaelite opened 3 months ago
It's not documented, but you can already do it by editing the add-on config raw JSON.
Open the add-on config, click 'Advanced'.
Find the following line:
"special_formatting": {
Copy paste the following lines to just below that line, to add shortcut for 'h1'.
"header1": {
"arg": {
"type": "text",
"value": "h1"
},
"command": "formatBlock",
"enabled": true,
"shortcut": "Ctrl+Shift+1"
},
It will result in the JSON looking like this:
...
"special_formatting": {
"header1": {
"arg": {
"type": "text",
"value": "h1"
},
"command": "formatBlock",
"enabled": true,
"shortcut": "Ctrl+Shift+1"
},
"fontcolor": {
"arg": {
"type": "color",
"value": "#00f"
},
"command": "foreColor",
"enabled": true,
"shortcut": "F7"
},
...
You can change the lines to 'header2' and 'h2', etc. and copy paste, to add shortcuts for other headers.
Thank you!!! Is there also a shortcut to format back to normal. The remove format shortcut doesn't work...
If Ctrl+R doesn't work, I don't think there is a simple way to do it.
If you are experienced with Javascript, you could write some code to achieve it.
A nice addition to the already present set of formats inside the addon would be the ability to make turn a highlighted text into headings (H1, H2...), each being gradually smaller in size.