filterOnlyParentElements = node => {
  return isBlockContainer(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
}
This file is copy from [medium-editor](https://github.com/yabwe/medium-editor)
and customize for specialized use.