Other ways to add indentation

I want to completely bypass the addition of indent props to the nodes and want a very simple way of adding indentation which is same as the previous line. Is there any alternative way to achieve this without indent props ?

Add an indentService that does this.

1 Like

Thanks @marijn for the response. From the docs I am sure that this is what I am looking for. I am looking into the docs and found out that indentService is a Facet which can be attached to a editorState but I am not able to find how can I access an editorState and add the indentService facet to it. I have find one way to access state which is via ReactCodeMirrorRef but I am not sure is it correct way to go about it.

@marijn I know above question may sound stupid but have been stuck on it for days now :sweat_smile:

Creating a view and passing in a set of extensions is extremely basic CodeMirror usage… see docs like the configuration example.

1 Like

Thank you so much @marijn The solution worked like a charm :grinning: Have been stuck on this for so long, finally I can rest, thanks again!