function block(type, attrs) {
  let result = function(...args) {
    let myAttrs = takeAttrs(attrs, args)
    let {nodes, tag} = flatten(type.schema, args, id)
    let node = type.create(myAttrs, nodes)
    if (tag != noTag) node.tag = tag
    return node
  }
  if (type.isLeaf) try { result.flat = [type.create(attrs)] } catch(_) {}
  return result
}
function block(type, attrs) {
  let result = function(...args) {
    let myAttrs = takeAttrs(attrs, args)
    let {nodes, tag} = flatten(type.schema, args, id)
    let node = type.create(myAttrs, nodes)
    if (tag != noTag) node.tag = tag
    return node
  }
  if (type.isLeaf) try { result.flat = [type.create(attrs)] } catch(_) {}
  return result
}
function block ( type , attrs ) { let result = function ( ... args ) { let myAttrs = takeAttrs ( attrs , args ) let { nodes , tag } = flatten ( type . schema , args , id ) let node = type . create ( myAttrs , nodes ) if ( tag != noTag ) node . tag = tag return node } if ( type . isLeaf ) try { result . flat = [ type . create ( attrs ) ] } catch ( _ ) { } return result }
: (string, ?Object) → (...content: [union<string, Node>]) → Node Create a builder function for nodes with content.
: ( string ?Object ) → ( ... content : [ union<string Node > ] ) → Node Create a builder function for nodes with content .