"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = convertFromHTML;

var _prosemirrorModel = require("prosemirror-model");

var _prosemirrorState = require("prosemirror-state");

var _convertFromDOMElement = _interopRequireDefault(require("./convertFromDOMElement"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function convertFromHTML(html, schema, plugins) {
  const root = document.createElement('html');
  root.innerHTML = html ? html : ' ';
  return (0, _convertFromDOMElement.default)(root, schema, plugins);
}