diff --git a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj index 3077f2c0dc5..054eb884b1b 100644 --- a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj +++ b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj @@ -73,7 +73,7 @@ - + diff --git a/src/BootstrapBlazor.Server/Components/Samples/Editors.razor b/src/BootstrapBlazor.Server/Components/Samples/Editors.razor index 7b0ad54fdb9..49cf62bee4b 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Editors.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Editors.razor @@ -15,6 +15,10 @@
builder.Services.Configure<HubOptions>(option => option.MaximumReceiveMessageSize = null);
+

@Localizer["EditorsUploadDesc"]

+
public Func<EditorUploadFile, Task<string>>? OnFileUpload { get; set; }
+

@((MarkupString)Localizer["EditorsUploadDesc2"].Value)

+ diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 5df53dedc07..e11e524b7b1 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -2460,6 +2460,8 @@ "EditorsTitle": "Editor", "EditorsDescription": "Convert the entered text into html code snippets", "EditorsTips": "The Editor component is a secondary package of Summernote component, such as If you need to use the localization function, please download the corresponding language pack from the official website and quote it by yourself. zh-CN en-US has been built in the required css JavaScript dynamically loaded on demand. If you edit too much content, signalR communication interruption may be triggered. Please adjust the HubOptions configuration.", + "EditorsUploadDesc": "Upload File Callback", + "EditorsUploadDesc2": "After the component sets a callback, when a file is selected for upload within the component, it will be returned to the caller as an instance of EditorUploadFile. The Stream property allows saving to the server or directly storing to Cloud Object Storage (OSS). The callback return value is the Url used for previewing the stored file.", "EditorNormalTitle": "Basic usage", "EditorNormalIntro": "The default rendering is div and it becomes a rich text edit box when clicked", "EditorNormalDescription": "Set the IsEditor attribute value to control whether the component defaults to div or editor", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 1ff2e232d46..14731d3b0c2 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -2460,6 +2460,8 @@ "EditorsTitle": "Editor 富文本框", "EditorsDescription": "将输入的文字转化为 html 代码片段", "EditorsTips": "Editor 组件是对 Summernote 组件 的二次封装,如需使用本地化功能请自行官网下载相对应语言包,自行引用即可,zh-CN en-US 已内置;组件所需 css JavaScript 均按需动态加载,使用者无需设置。由于 summernote 组件依赖 jQuery,所以需要自行引用 jQuery 脚本包。如果编辑内容过多,可能会触发 signalR 通讯中断问题,请自行调整 HubOptions 配置即可。", + "EditorsUploadDesc": "文件上传回调", + "EditorsUploadDesc2": "组件设置回调后,在组件中选择文件上传时,会以 EditorUploadFile 实例形式返回给调用者,通过其属性 Stream 可以实现保存到服务器或者直接存储到 云对象存储(OSS)中。回调返回值为文件存储后用于预览的 Url", "EditorNormalTitle": "基础用法", "EditorNormalIntro": "默认呈现为 div 点击后变为富文本编辑框", "EditorNormalDescription": "通过设置 IsEditor 属性值来控制组件默认是 div 还是 editor",