Format text nodes in a new line, possible?

Having a HTML element, I’m currently using the formatting.js function from here to format code that is not properly indented.

It works pretty well, but now I would like to see if I can go one step forward and always place text nodes in a new linee.

So instead of having:

<p>Hello there

I would like to havee:

      Hello there

Does this sound like something possible with codemirror?

No. Formatting hasn’t been part of this library since version 3, so you’ll have to look elsewhere for that functionality.