The Node API has .copy
to make a new node with different content, .mark
for different marks, but nothing for different attrs.
In fact I think the only way to do this with the public API is a round-trip through JSON. Is that right?
Would you accept a PR adding .setAttrs
@marijn? And how about one for a public constructor?
Is there some subtlety that complicates this?