« Return to Thread: textbuffer text as string with markup.

textbuffer text as string with markup.

by jmauster :: Rate this Message:

Reply to Author | View in Thread

Hi,

Let's say I have a TextView called textNote. And let's say that there are some tags that have been applied (bold, italics).

When I use this code in an eventhandler:

string text = textNote.Buffer.Text;
textNote.Buffer.Text = string.Empty;
textNote.Buffer.Text = text;

I end up losing the markup. Why is that? How can I preserve the markup in a string?

Thanks,

Evan

 « Return to Thread: textbuffer text as string with markup.