setRichString

fun setRichString(richString: <Error class: unknown class>)

Replaces the entire text and formatting attributes of this state with the given richString.

This resets the editor content, clears any active typing attributes, resets the undo history, and clamps the cursor selection if it exceeds the new text length.