Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to save rich text format in database using java

string rtfText= ... //string from db
byte[] byteArray = Encoding.ASCII.GetBytes(rtfText);
using (MemoryStream ms = new MemoryStream(byteArray))
{
    TextRange tr = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);
    tr.Load(ms, DataFormats.Rtf);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #rich #text #format #database #java
ADD COMMENT
Topic
Name
4+5 =