javascript - Copy rich text format string as formatted text -
i have rtf string coppied clipboard ( c#/javascript code ). user should able copy text outlook. should nice looking , user friendly formatted text , not actual rtf string.
how 'convert' string nice formatted text ? ( in case outlook rich text editor, takes string plain text )
you need make sure use right parameters when add rtf
data clipboard.
here c# code tested wark copying formatted text richttextbox
wordpad:
clipboard.setdata(dataformats.rtf, (object)richtextbox1.rtf);
if rtf text in clipboard in wrong, plain-text format, retrieve , put correctly:
string temp = clipboard.getdata(dataformats.text).tostring(); clipboard.setdata(dataformats.rtf, (object)temp);