Netlify-cms: [Feature] Add headline levels 3 - 6 to markdown editor

Created on 2 Nov 2018  路  10Comments  路  Source: netlify/netlify-cms

Is your feature request related to a problem? Please describe.

The markdown editor is missing functionality for the editors of my current project.

Describe the solution you'd like

The markdown editor currently only supports heading-one and headling-two. It would be nice, if it could support up to heading-six.

I almost have a PR in place, but wanted to confirm with you, whether this is something you'd like to have.

Describe alternatives you've considered

Refactoring the toolbar, so it can take any kind of formatting button.

extensionwidgetmarkdown claimed beginner feature accepted

Most helpful comment

My two cents on this is the default should be h2 & h3 (as h1 is most often to be the _title/identifier_field_ field of the content item).

Though if it's something that can be configured, then that would be awesome.

All 10 comments

IMO this would be a welcome feature. From a design point of view, I'd like to see one select with six heading options within instead of 6 separate bulky heading buttons.

Default should still be the current H1/H2 buttons, and the header selection dropdown would be available as an option.

@erquhart Sounds good to me. Let me see, if I can put together a PR with the start of next week.

@erquhart even better

yes, please, and thank you :-)

I vote for H1, H2 and H3 being visible, with a dropdown for H4 through H6, as most of the authors I work with seem to go down three levels...

all...

the...

time...

We wouldn't have both buttons and a dropdown at the same time, that's a lot in the toolbar. Even if you use headings all the time, using a drop down to select is a pretty minimal hassle.

At some point I'd like to see markdown shortcuts working in the rich text editor, great shortcut for power users that don't want to drop all the way down to writing raw markdown.

My two cents on this is the default should be h2 & h3 (as h1 is most often to be the _title/identifier_field_ field of the content item).

Though if it's something that can be configured, then that would be awesome.

I'd like to take a shot at contributing to this issue.

It seems a dropdown with the different headings (H1-H6) would be the best solution. This would be my first contribution so feel free to correct me if I'm wrong, but it seems like there would need to be a ToolbarDropdown component, and this would replace the H1 and H2 ToolbarButtons currently being displayed.

Hi @SimonMckeon - yeah that makes sense. If you check out the last button in the toolbar, you should be able to reuse that dropdown functionality for this.

Other thoughts:

  • The current H1 icon would work, just need to drop the "1" glpyh
  • Would need to work with the buttons configuration to only enable certain heading levels (all by default)

Thanks for digging in! If you have any questions, please fire away 馃憤

Closed in #2879.

Was this page helpful?
0 / 5 - 0 ratings