title: Convert RTF to and from plain text
body: <p>I have a requirement to convert plain text to and from RTF (RichText Format) using javascript.</p>
  
  <p>I am looking for a function for each conversion, and I am not looking to use a library.</p>
  
  <p><strong>Conversion from plain to RTF</strong></p>
  
  <p>The formatting styles and colours are not important, all that matters is that the plain text i converted into a <strong>valid</strong> RTF format</p>
  
  <p><strong>Conversion from RTF to plain</strong></p>
  
  <p>Again, the styles are not important. They can be completed removed. All that is required is that <strong>all</strong> text data remains (no loss of entered data)</p>