Extract webvieweditor to share between compose page and signature editor (#578)

* initial work for webview editor control

* moved more stuff to editor itself

* revert packages.props indention changes

* move alignment logic

* Migrate signature editor to new control

* move background to editor control

* Some polishing

* Fixed the corner glitch issue with dark theme.

---------

Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
This commit is contained in:
Aleh Khantsevich
2025-02-22 00:43:39 +01:00
committed by GitHub
parent f61bcb621b
commit 5073ead8fe
12 changed files with 542 additions and 780 deletions

View File

@@ -29,4 +29,17 @@ public static class WebViewExtensions
return string.Empty;
}
public static async Task<string> ExecuteScriptSafeAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string script)
{
if (Chromium == null) return string.Empty;
try
{
return await Chromium.ExecuteScriptAsync(script);
}
catch { }
return string.Empty;
}
}