mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
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.
42 lines
1.5 KiB
Plaintext
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}");
|
|
}
|
|
} |