Hi,
I need to write very simple RTF parser to write and read basic rtf (bold,italic, underline, paragraph et al). I have searched for techniques I can implement but havent found good example.
I would like to hear from you guys what approach whatsoever you consider to be best for you.
Thanks!
Stefano Mtangoo 455 Senior Poster
Recommended Answers
Jump to PostIf you want to write your own, I think you could start easy by replacing RTF tags for HTML tags. For example replace
\b
with<strong>
,\b0
with</strong>
and likewise for\i
being<em>
. It depends on how far you want to take this.
Jump to PostI am not convinced by jmichae3's example. I think the nesting of RTF is the same as HTML, so the example given is faulty RTF. I have never seen an RTF editor output bold and italic in that order.
All 9 Replies

jmichae3
Stefano Mtangoo 455 Senior Poster

jmichae3

jmichae3

jmichae3
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster

jmichae3
Stefano Mtangoo 455 Senior Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.