I have a requirement to convert plain text to and from RTF (RichText Format) using javascript.
I am looking for a function for each conversion, and I do not want to use the library.
Convert from plain to RTF
Formatting styles and colors are not important, all that matters is that plain text converted to a valid RTF format
Convert from RTF to Regular
Again, styles are not important. They can be removed. All that is required is that the text data all remains (without losing the entered data)
source share