Files
radzen-blazor/RadzenBlazorDemos/Pages/HtmlEditorGetSetValue.razor
Atanas Korchev 41db785c31 Move Upload demo to /upload and rename upload API to api/upload
The Upload component demo was served at /example-upload because the demo
host's UploadController owned the /upload URL space. Move the controller's
endpoints under api/upload/* to free /upload, point the demo page and every
consumer (Upload and HtmlEditor demos) at the new paths, switch the page
route and ExampleService path to /upload, and add a permanent 301 redirect
from /example-upload (and the legacy docs URL) to /upload.
2026-06-23 12:45:15 +03:00

42 lines
1.5 KiB
Plaintext

<RadzenHtmlEditor @bind-Value=@htmlValue style="height: 450px;" Input=@OnInput Change=@OnChange Paste=@OnPaste UploadComplete=@OnUploadComplete Execute=@OnExecute UploadUrl="api/upload/image" />
<EventConsole @ref=@console />
@code {
string htmlValue = @"<h2 style=""text-align:center"">Accelerated, smarter, and cost-effective Blazor development</h2>
<h3 style=""text-align:center"">Radzen Blazor Studio provides tons of productivity gains for Blazor developers</h3>
<div style=""text-align:center"">
<img alt=""Radzen Blazor Studio"" src=""images/radzen-blazor-studio-dark.png"" width=""300"">
</div>
<h4 style=""text-align:center"">Get started today. Radzen Blazor Studio is free to use.</h4>
<div style=""text-align:center"">
<a href=""https://www.radzen.com/blazor-studio/download"" target=""_blank"" title=""Get Radzen Blazor Studio for Windows, Mac or Linux"">Download Now</a>
</div>";
EventConsole console;
void OnPaste(HtmlEditorPasteEventArgs args)
{
console.Log($"Paste: {args.Html}");
}
void OnChange(string html)
{
console.Log($"Change: {html}");
}
void OnInput(string html)
{
console.Log($"Input: {html}");
}
void OnExecute(HtmlEditorExecuteEventArgs args)
{
console.Log($"Execute: {args.CommandName}");
}
void OnUploadComplete(UploadCompleteEventArgs args)
{
console.Log($"Upload complete: {args.RawResponse}");
}
}