I added context menu to the richboxtext with only one function "paste". What code will paste my clipboard content (e.g. copied from Microsoft Word) to the richboxtext form? I tried with:
private void PasteToolStripMenuItem_Click_1(object sender, EventArgs e)
{
richTextBox1.Text = Clipboard.GetText();
}
but it pastes non-formatted text. How can I paste text with the formatting?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…