src/model/schema.js
// Test whether the given node could be contained in this node type.
Test whether the given node could be contained in this node type.
Test whether the given node could be contained in this node type .
canContain(node) {
    if (!this.canContainType(node.type)) return false
    for (let i = 0; i < node.marks.length; i++)
      if (!this.canContainMark(node.marks[i])) return false
    return true
  }
canContain ( node ) { if ( ! this . canContainType ( node . type ) ) return false for ( let i = 0 ; i < node . marks . length ; i ++ ) if ( ! this . canContainMark ( node . marks [ i ] ) ) return false return true }
Test whether the given node could be contained in this node type.
Test whether the given node could be contained in this node type .