Mark with a custom 'node' view that defines its own content

Node views don’t apply to marks, and don’t exist when rendering the document statically via a DOMSerializer. In general, marks are rendered separately from their content (the content is inserted into them after rendering), and their rendering functions don’t even get to see the content yet. So you’ll either have to adjust to that, or define an entirely custom static renderer (which also isn’t very hard).