import { RichContent } from "./../../../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { createParagraphNode, createTextNode, initializeMetadata } from "../../node-utils.js";
const fromPlainText = (text) => {
  const paragraphs = text.split("\n").map(
    (paragraph) => createParagraphNode(paragraph ? [createTextNode(paragraph)] : [])
  );
  const content = {
    nodes: paragraphs,
    metadata: initializeMetadata()
  };
  return RichContent.fromJSON(content);
};
export {
  fromPlainText
};
//# sourceMappingURL=from-plain-text.js.map
