# Format text nodes in a new line, possible?

**URL:** <https://discuss.codemirror.net/t/format-text-nodes-in-a-new-line-possible/2491>\
**Category:** Uncategorized\
**Created:** [June 26, 2020, 3:06pm UTC](https://discuss.codemirror.net/t/format-text-nodes-in-a-new-line-possible/2491 "2020-06-26T15:06:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mrstevejobs](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/mrstevejobs/32/818_2.png) [@mrstevejobs](https://discuss.codemirror.net/u/mrstevejobs)\
**Post date:** [June 26, 2020, 3:06pm UTC](https://discuss.codemirror.net/t/format-text-nodes-in-a-new-line-possible/2491/1 "2020-06-26T15:06:15Z")

</div>

Having a HTML element, I’m currently using the formatting.js function from here to format code that is not properly indented.  
[https://codemirror.net/2/lib/util/formatting.js](https://codemirror.net/2/lib/util/formatting.js)

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
</p>

```

I would like to havee:

```
<p>
      Hello there
</p>

```

Does this sound like something possible with codemirror?

---

_[View the full topic](https://discuss.codemirror.net/t/format-text-nodes-in-a-new-line-possible/2491)._
