The Rich Edit control (named
TRichEdit in Delphi 2.x+) introduced as a part of Windows 95 common controls can only support a subset of the Rich Text Format (
RTF) codes. Which means, if you save a file as a RTF file in Microsoft Word (for example), you may not be able to view that file the same way depending on which codes you used in the original file. On the other hand, you may be able to see some of the tags, but won't be able to save or modify them within the Rich Edit control itself.The good news is that the Rich Edit control supports majority of the codes making it a light weight control which most programs can use without worrying about the missing tags or codes.
Here's a list of RTF codes Win32 Rich Edit control can understand:
- | * | : | \\ | \n | \r | _ | { | | | } | ~ | ansi | b | bin | blue | bullet | cb | cell | cf | colortbl | cpg | deff | deflang | deftab | dibitmap | dn | dy | emdash | endash | f | fbidi | fchars | fcharset | fdecor | fi | field | fldinst | fldrslt | fmodern | fnil | fontemb | fontfile | fonttbl | footer | footerf | | footerl | footerr | footnote | froman | fs | fscript | fswiss | ftech | ftncn | ftnsep | ftnsepc | green | header | headerf | headerl | headerr | horzdoc | hr | i | info | intbl | lang | lchars | ldblquote | li | line | lquote | ltrch | ltrdoc | ltrmark | ltrpar | mac | macpict | margl | marglsxn | margr | margrsxn | min | mo | nocwrap | nooverflow | nosupersub | nowwrap | objautlink | | objclass | objcropb | objcropl | objcropr | objcropt | objdata | object | objemb | objh | objicemb | objlink | objname | objpub | objscalex | objscaley | objsetsize | objsub | objw | par | pard | pc | pca | piccropb | piccropl | piccropr | piccropt | pich | pichgoal | picscalex | picscaley | pict | picw | picwgoal | plain | pmmetafile | pn | pnindent | pnlvlblt | pntext | pntxta | pntxtb | protect | qc | ql | qr | | rdblquote | red | result | revauth | revised | ri | row | rquote | rtf | rtlch | rtldoc | rtlmark | rtlpar | sec | sect | sectd | strike | stylesheet | sub | super | tab | tb | tc | tx | ul | uldash | uldashd | uldashdd | ulhair | ulnone | ulth | ulwave | up | v | vertdoc | wbitmap | wbmbitspixel | wbmplanes | wbmwidthbytes | wmetafile | xe | yr | zwj | zwnj | |
If you must have a control that can support all the RTF codes, you may want to consider a third party control or using an OLE control such as Microsoft Word.