This patch adds support of different headings (essentially, HTML h1..h6 tags).
Those might be pretty useful when formatting a rich text (I'm having KJots - note taking app - in mind)
QTextBlockFormat supports headingLevel since Qt 5.12; however, as stated in the documentation,
setHeadingLevel does not adjust style (font size, etc), so we have to take care of it on our own.
It also adds a KSelectAction to choose between different headings.
There are few behavior nuances:
- If user presses Enter at the end of heading line, cursor should switch to basic text
- If user presses Enter in the middle of the heading, line just breaks into two headings
- If user presses Backspace at the beginning of a line after the heading, the line is merged with the previous one (and thus becomes heading itself)
- The same with Delete at the end of heading line: the next line should become heading too.