import { Node } from "./../../pm/model.js";
import { getSchema } from "./get-schema.js";
import { getTextSerializersFromSchema } from "./get-text-serializers-from-schema.js";
import { getText } from "./get-text.js";
function generateText(doc, extensions, options) {
  const { blockSeparator = "\n\n", textSerializers = {} } = options || {};
  const schema = getSchema(extensions);
  const contentNode = Node.fromJSON(schema, doc);
  return getText(contentNode, {
    blockSeparator,
    textSerializers: {
      ...getTextSerializersFromSchema(schema),
      ...textSerializers
    }
  });
}
export {
  generateText
};
//# sourceMappingURL=generate-text.js.map
