The code below loads an rtf file and display its contents in a TextArea.
Exempted the line where I added a link (select text, cmd-k, paste the URL, close in TextEdit).
Nota: I do not found a piece of code in the docs that shows how to load an rtf file, so I wrote my own:
Var Type_RTF As New FileType
Type_RTF.Name = "text/r*ch"
Type_RTF.Extensions = "rtf"
Var RTF_File_FI As FolderItem
RTF_File_FI = FolderItem.ShowOpenFileDialog(Type_RTF)
Var RTF_BS As BinaryStream
RTF_BS = BinaryStream.Open(RTF_File_FI, False)
TA.StyledText.RTFData = RTF_BS.Read(RTF_File_FI.Length)
RTF_BS.Close
RTF_File_FI = Nil