Custom styles for marks (**, #, ###, -, etc..,) and V5 list functionality in V6 - Markdown

I need to add custom styles for all markdown the marks (*, **, #, ##, ###, -, [], etc…,). I came across tags.meta which allows to style the marks. But, I am not able to apply different styles for different marks. How can I add different styles for different marks?

I have to press the Enter 3 times to get out of the list in V6. In V5, we can opt out of the list with only 2 presses. How can I implement the V5 functionality of lists in V6?

I am completely new to this kind of library. And I am not able to follow the documentation correctly. Your help will be much appreciated. Thank you.

You can define custom highlighting tags and style them with highlight styles, and then use the extensions option to lang-markdown to pass something like {props: styleTags({EmphasisMark: emphasisMarkTag, ...})} to add those tags to specific syntax nodes.

The insertNewlineContinueMarkup doesn’t support the behavior you describe, so you’d have to implement your own command.

Thank you @marijn for the quick reply. Can you share sample examples for both of them? The documentation is hard for me to understand (don’t have clarity on the CodeMirror system).

Then I’d say your first goal should be to learn to read them and understand the concepts, because otherwise you’ll just get stuck on the next thing you need to do and I don’t think people on the forum will have time to walk you though everything.

Sure, I will try to read and understand. Thank you.