private void ResolveBackspaceKey(RichFactTextBox rtb, KeyEventArgs e)
        {
            var caretPos        = rtb.CaretPosition;
            var textBeforeCaret = caretPos.GetTextInRun(LogicalDirection.Backward);

            if (caretPos.Parent is Run run)
            {
                if (textBeforeCaret == "")
                {
                    var previousRun = run.PreviousInline ?? new Run();
                    if (previousRun.GetType() == typeof(Hyperlink))
                    {
                        var hLink    = previousRun as Hyperlink;
                        var hLinkRun = hLink.Inlines.FirstInline as Run;
                        if (hLinkRun.Text.Length == 1)
                        {
                            var lastHyperlinkCharacterData = new LastHyperlinkCharacterData
                            {
                                rtb       = rtb,
                                hyperlink = hLink,
                            };
                            Ea.Publish(new WarningLastHyperlinkCharacterEventModel()
                            {
                                Data = lastHyperlinkCharacterData
                            });
                            //TODO make someone listen to this
                            e.Handled = true;
                        }
                    }
                }
                else //if the caret is not at the start of the Run
                {
                    var list       = caretPos.Paragraph.Inlines.ToList();
                    var indexOfRun = list.IndexOf(run);
                    if (indexOfRun != -1)
                    {
                        var indexOfPrevRun = 0;
                        if (indexOfRun != 0 || indexOfRun > 0)
                        {
                            indexOfPrevRun = indexOfRun - 1;
                        }
                        var prevRun = list[indexOfPrevRun];
                        if (textBeforeCaret == "")
                        {
                            if (prevRun.GetType() == typeof(Hyperlink))
                            {
                                if (run.Text.Length == 1)
                                {
                                    //MessageBox.Show("last character!");
                                    //event
                                    e.Handled = true;
                                }
                            }
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Checks which key was pressed and handles
        /// accordingly.
        /// </summary>
        /// <param name="rtb"></param>
        /// <param name="e"></param>
        public void PrevKeyDown(RichFactTextBox rtb, KeyEventArgs e)
        {
            var caretPos = rtb.CaretPosition;

            if (e.Key == Key.Enter)
            {
                e.Handled = true;
                caretPos.InsertLineBreak();
            }
            if (e.Key == Key.Back)
            {
                ResolveBackspaceKey(rtb, e);
            }
        }