Я подумал, что можно просто подавить его с помощью:
Код: Выделить всё
[JSInvokable]
public async Task OnKeyPressedWithContent(string key, string htmlContent)
{
//the editor returns the first entry in a tag we do not want this unless the user has pressed enter
string pattern = @".*?
";
if (htmlContent.Length == 8 && System.Text.RegularExpressions.Regex.IsMatch(htmlContent, pattern))
{
htmlContent = htmlContent.Substring(3, 1);
}
if (htmlContent == defaultWhenEmpty) htmlContent = string.Empty;
await OnContentChanged.InvokeAsync(htmlContent);
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... texteditor
Мобильная версия