# Wrapper for multi line nodes

**URL:** <https://discuss.prosemirror.net/t/wrapper-for-multi-line-nodes/3294>\
**Category:** Uncategorized\
**Created:** [November 24, 2020, 9:52am UTC](https://discuss.prosemirror.net/t/wrapper-for-multi-line-nodes/3294 "2020-11-24T09:52:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_v3](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/_/ebca7d/32.png) [@\_v3](https://discuss.prosemirror.net/u/_v3)\
**Post date:** [November 24, 2020, 9:52am UTC](https://discuss.prosemirror.net/t/wrapper-for-multi-line-nodes/3294/1 "2020-11-24T09:52:36Z")

</div>

I would like to create a custom schema that allows to wrap all kinds of nodes. It should be possible to insert both inline nodes and block nodes without inserting additional empty lines. My previous definition looks like this:

```
{
  content: 'inline*',
  attrs: extra.defaults(),
  parseDOM: [
    {
      tag: 'tb',
      getAttrs: (node) => ({
        ...extra.parse(node),
      }),
    },
  ],
  toDOM: (node) => ['tb', extra.dom(node), 0],
}

```

The biggest problem with this definition is that nodes like the following do work: ` <tb><p>This is inline</p></tb>` (also possible without

tags) but the display of multiline texts fails: `<tb><p>first line</p><p>second line</p></tb>` The result looks like: `first linesecondline` instead of the desired outcome: first line _line break_ second line

I already tried to replace the content: ‘inline\*’ with ‘(text | hardBreak)\*’ as both tags are marked as an inline node. My input dom looks like `<tb><text>first line</text><br><text>second line</text></tb>`. In this case only the first line is part of the output.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [November 24, 2020, 10:58am UTC](https://discuss.prosemirror.net/t/wrapper-for-multi-line-nodes/3294/2 "2020-11-24T10:58:44Z")

</div>

How are you wrapping paragraphs in a node that allows inline content? Or is the problem that the paragraphs are stripped out during DOM parsing?
