How to add an attribute to a paragraph block

I think you can use like this way dispatch(tr.setNodeMarkup($from.before(), undefined, { ...attrs, someValue }))