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); 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -