Hello, Welcome to Micorosoft Q&A,
How can we copy-paste text and image both from clipboard in uwp C#?
Please refer this code sample Copy Text scenario. you could use dataPackageView.GetHtmlFormatAsync method to get current content with html string and render it with WebView control.
if (dataPackageView.Contains(StandardDataFormats.Html))
{
this.DisplayResourceMapAsync(dataPackageView);
string htmlFormat = null;
try
{
htmlFormat = await dataPackageView.GetHtmlFormatAsync();
}
catch (Exception ex)
{
rootPage.NotifyUser("Error retrieving HTML format from Clipboard: " + ex.Message, NotifyType.ErrorMessage);
}
if (htmlFormat != null)
{
string htmlFragment = HtmlFormatHelper.GetStaticFragment(htmlFormat);
OutputHtml.NavigateToString("HTML:<br/ > " + htmlFragment);
}
}
else
{
OutputHtml.NavigateToString("HTML:<br/ > HTML format is not available in clipboard");
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.