I am looking to prevent wrapping my block in a paragraph I have a mark looking like this
'text-alignment': {
content: 'inline*',
group: 'block',
parseDOM: [{ tag: 'p' }],
toDOM(mark) {
return ['p', { style: `text-align: ${mark.attrs.align}` }, 0];
},
attrs: {
align: {},
},
},
My input: <p>Share information about your brand with your customers. Describe a product, make <span style="color: yellow"><span style="background-color: red">announcements</span></span>, or welcome customers to your store.</p>
My output after go through ProseMirror: <p><p style="text-align: null">Share information about your brand with your customers. Describe a product, make </p><span style="color: yellow"><span style="background-color: red"><p style="text-align: null">announcements</p></span></span><p style="text-align: null">, or welcome customers to your store.</p></p>