Circle V2 API Docs
    Preparing search index...

    Function prepareRichTextEditorHtml

    • Coerces arbitrary string input into HTML suitable for TipTap (or similar) content.

      • If the trimmed string opens with a known-safe HTML tag, it is sanitized and returned.
      • Otherwise the string is treated as plain text: split on blank lines into paragraphs, HTML-escaped, with single newlines inside a block rendered as <br />.

      Parameters

      • raw: string

      Returns string