Feature request: parseRule.contentElement as a function

Something like

if (typeof contentElement == "function") {
    contentDOM = contentElement(dom)

could be very useful in cases where the contentElement cannot be “selected” trivially. It’s a one-line change in prosemirror-model/from_dom.js. Is this an acceptable request, does it need more arguments ?

Also i’m using it right now in a project and it’s very handy.

I think that’s reasonable. Be sure to update the doc comments when you create a PR.