madebymany / sir-trevor-js

Rich content editing entirely re-imagined for the web
http://madebymany.github.io/sir-trevor-js/
MIT License
4.51k stars 397 forks source link

Heading block can support 3 levels (H2, H3, H4) #581

Closed Ardnived closed 4 years ago

Ardnived commented 4 years ago

Or it could easily support H1 - H6 with a different configuration.

Ardnived commented 4 years ago
Screenshot 2020-05-04 at 17 02 50

The format bar icon will change with each heading level (H_, H2, H3, H4). To accomplish that I used an SVG without any number, and then rendered the number, or blank with CSS. I wasn't sure which symbol would be best to use when there is no heading (maybe I should just use H2). I tried a few different ones, but they didn't look quite right. Do you have a suggestion for that?

Ardnived commented 4 years ago

That's a much better idea than what I've done for sure. If you have the time, please go ahead. Otherwise I'll come around to it later today.