Good evening, in fact in the example that you left the link there is all the necessary code to implement your goal. After reading your requirements I have compiled a small form.

After taking the source code from the example a bit of his corrections and got the desired result. The logic here is this: the entire text from textBox1 was transferred to richTextBox1, then the very richTextBox1 itself replaces characters with pictures (smiles), you can also clear textBox1, but this is up to you.

I hope this will satisfy your requirements. I will leave the whole code below. Ask questions, try to answer.
private void add_smileys(TextBox tb,RichTextBox rtb) { var smileys = new Dictionary<string, Image>() { { @":)", Resources.in_smile }, { @">:(", Resources.in_angry }, }; //Изменения здесь. Очищаем поле richTextBox1 перед его использованием richTextBox1.Text = null; //Вставляем текст из textBox1 в richTextBox1 rtb.Text = tb.Text; foreach (var smiley in smileys) { add_smiley(rtb, smiley.Key, smiley.Value); } } private void add_smiley(RichTextBox rtb, string token, Image smiley) { while (true) { var selectionStart = rtb.Find(token, RichTextBoxFinds.WholeWord); if (selectionStart < 0) break; try { rtb.SelectionStart = selectionStart; rtb.SelectionLength = token.Length; Clipboard.SetImage(smiley); rtb.Paste(); } catch (Exception ex) { MessageBox.Show(ex.Message); break; } } } private void button1_Click(object sender, EventArgs e) { add_smileys(textBox1,richTextBox1); }