Skip to content

Commit 21c87e5

Browse files
authored
doc(Editor): update EditorUploadFile docmentation (#7397)
* chore: update version to 10.0.2 * doc(Editor): update docmentation
1 parent 766081e commit 21c87e5

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<PackageReference Include="BootstrapBlazor.Sortable" Version="10.0.0" />
7474
<PackageReference Include="BootstrapBlazor.Splitting" Version="10.0.0" />
7575
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="10.0.0" />
76-
<PackageReference Include="BootstrapBlazor.SummerNote" Version="10.0.1" />
76+
<PackageReference Include="BootstrapBlazor.SummerNote" Version="10.0.2" />
7777
<PackageReference Include="BootstrapBlazor.TableExport" Version="10.0.1" />
7878
<PackageReference Include="BootstrapBlazor.Tasks.Dashboard" Version="10.0.0" />
7979
<PackageReference Include="BootstrapBlazor.Topology" Version="10.0.0" />

src/BootstrapBlazor.Server/Components/Samples/Editors.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
<Pre class="no-highlight mb-3">builder.Services.Configure&lt;HubOptions&gt;(option => option.MaximumReceiveMessageSize = null);</Pre>
1717

18+
<p class="code-label">@Localizer["EditorsUploadDesc"]</p>
19+
<Pre>public Func&lt;EditorUploadFile, Task&lt;string&gt;&gt;? OnFileUpload { get; set; }</Pre>
20+
<p>@((MarkupString)Localizer["EditorsUploadDesc2"].Value)</p>
21+
1822
<PackageTips Name="BootstrapBlazor.SummerNote" />
1923

2024
<DemoBlock Title="@Localizer["EditorNormalTitle"]" Introduction="@Localizer["EditorNormalIntro"]" Name="Normal">

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,8 @@
24602460
"EditorsTitle": "Editor",
24612461
"EditorsDescription": "Convert the entered text into <code>html</code> code snippets",
24622462
"EditorsTips": "The <code>Editor</code> component is a secondary package of <a href='https://summernote.org/' target='_blank'><code>Summernote component</code></a>, 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. <code>zh-CN</code> <code>en-US</code> has been built in the required <code>css</code> <code>JavaScript</code> dynamically loaded on demand. If you edit too much content, <code>signalR</code> communication interruption may be triggered. Please adjust the <code>HubOptions</code> configuration.",
2463+
"EditorsUploadDesc": "Upload File Callback",
2464+
"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 <code>EditorUploadFile</code>. The <code>Stream</code> property allows saving to the server or directly storing to Cloud Object Storage (OSS). The callback return value is the <b>Url</b> used for previewing the stored file.",
24632465
"EditorNormalTitle": "Basic usage",
24642466
"EditorNormalIntro": "The default rendering is <code>div</code> and it becomes a rich text edit box when clicked",
24652467
"EditorNormalDescription": "Set the <code>IsEditor</code> attribute value to control whether the component defaults to <code>div</code> or <code>editor</code>",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,8 @@
24602460
"EditorsTitle": "Editor 富文本框",
24612461
"EditorsDescription": "将输入的文字转化为 <code>html</code> 代码片段",
24622462
"EditorsTips": "<code>Editor</code> 组件是对 <a href='https://summernote.org/' target='_blank'><code>Summernote 组件</code></a> 的二次封装,如需使用本地化功能请自行官网下载相对应语言包,自行引用即可,<code>zh-CN</code> <code>en-US</code> 已内置;组件所需 <code>css</code> <code>JavaScript</code> 均按需动态加载,使用者无需设置。由于 <code>summernote</code> 组件依赖 <b>jQuery</b>,所以需要自行引用 <code>jQuery</code> 脚本包。如果编辑内容过多,可能会触发 <code>signalR</code> 通讯中断问题,请自行调整 <code>HubOptions</code> 配置即可。",
2463+
"EditorsUploadDesc": "文件上传回调",
2464+
"EditorsUploadDesc2": "组件设置回调后,在组件中选择文件上传时,会以 <code>EditorUploadFile</code> 实例形式返回给调用者,通过其属性 <code>Stream</code> 可以实现保存到服务器或者直接存储到 <b>云对象存储(OSS)</b>中。回调返回值为文件存储后用于预览的 <b>Url</b>",
24632465
"EditorNormalTitle": "基础用法",
24642466
"EditorNormalIntro": "默认呈现为 <code>div</code> 点击后变为富文本编辑框",
24652467
"EditorNormalDescription": "通过设置 <code>IsEditor</code> 属性值来控制组件默认是 <code>div</code> 还是 <code>editor</code>",

0 commit comments

Comments
 (0)