about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/EditablePre.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/EditablePre.razor')
-rw-r--r--MatrixRoomUtils.Web/Shared/EditablePre.razor18
1 files changed, 18 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Web/Shared/EditablePre.razor b/MatrixRoomUtils.Web/Shared/EditablePre.razor
new file mode 100644
index 0000000..01bea0d
--- /dev/null
+++ b/MatrixRoomUtils.Web/Shared/EditablePre.razor
@@ -0,0 +1,18 @@
+@inherits InputBase<string>
+<pre id="@Id" class="@CssClass" @onkeyup="Callback" contenteditable="true">@CurrentValue</pre>
+@code {
+    protected override bool TryParseValueFromString(string? value, out string result, out string? validationErrorMessage)
+    {
+        result = value;
+        validationErrorMessage = null;
+        return true;
+    }
+
+    public object Id { get; set; }
+
+    private async Task Callback()
+    {
+        Console.WriteLine("beep");
+    }
+
+}
\ No newline at end of file