EditablePre.razor (469B)
1 @inherits InputBase<string> 2 <pre id="@Id" class="@CssClass" @onkeyup="Callback" contenteditable="true">@CurrentValue</pre> 3 @code { 4 protected override bool TryParseValueFromString(string? value, out string result, out string? validationErrorMessage) 5 { 6 result = value; 7 validationErrorMessage = null; 8 return true; 9 } 10 11 public object Id { get; set; } 12 13 private async Task Callback() 14 { 15 Console.WriteLine("beep"); 16 } 17 18 }