annotatedStringToRtf
Convert a Compose AnnotatedString to an RTF document string — the inverse of rtfToAnnotatedString. Newlines split paragraphs; within each paragraph, contiguous characters sharing the same effective formatting become one styled run.