C2022-003-Change-Textboxes-to-RTF-3

This commit is contained in:
2025-11-26 14:31:59 -05:00
parent 52583a05f6
commit 9023cc76a0
18 changed files with 2615 additions and 1934 deletions

View File

@@ -1400,9 +1400,13 @@ namespace Volian.Controls.Library
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
int position = SelectionStart;
SelectionLength = 0;
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2025 - 003
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
{
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
}
linkValue = linkValue.Replace(@"{", @"\{");
linkValue = linkValue.Replace(@"}", @"\}");
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";