Skip to content

Commit 3c888bf

Browse files
Copiloth2lsArgoZhang
authored
doc(IDom2HtmlService): update documentation (#7885)
* docs: add Dom2HtmlService and SignalR setup tips for Dom2Image sample Agent-Logs-Url: https://github.com/dotnetcore/BootstrapBlazor/sessions/1f0099c2-9925-4e47-81b7-ffec60040f2d Co-authored-by: h2ls <33386249+h2ls@users.noreply.github.com> * docs: align Dom2Image setup snippets to builder.Services style Agent-Logs-Url: https://github.com/dotnetcore/BootstrapBlazor/sessions/1f0099c2-9925-4e47-81b7-ffec60040f2d Co-authored-by: h2ls <33386249+h2ls@users.noreply.github.com> * doc: 更新文档 * doc: 更新资源文件 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: h2ls <33386249+h2ls@users.noreply.github.com> Co-authored-by: Argo Zhang <argo@live.ca>
1 parent 77bb3ef commit 3c888bf

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
@page "/dom2image"
1+
@page "/dom2image"
22

33
<h3>@Localizer["Dom2ImageTitle"]</h3>
44

55
<h4>@Localizer["Dom2ImageIntro"]</h4>
66

77
<PackageTips Name="BootstrapBlazor.Dom2Image" />
88

9+
<Tips>
10+
<p>@((MarkupString)Localizer["Dom2ImageServiceInjectTip"].Value)</p>
11+
<Pre class="no-highlight">builder.Services.AddBootstrapBlazorDom2ImageService();</Pre>
12+
<p>@((MarkupString)Localizer["Dom2ImageSignalRConfigTip"].Value)</p>
13+
<Pre class="no-highlight">builder.Services.Configure&lt;HubOptions&gt;(option => option.MaximumReceiveMessageSize = null);</Pre>
14+
</Tips>
15+
916
<DemoBlock Title="@Localizer["Dom2ImageNormalTitle"]" Introduction="@Localizer["Dom2ImageNormalIntro"]" Name="Normal">
1017
<section ignore>
1118
<p>@((MarkupString)Localizer["Dom2ImageDesc"].Value)</p>
@@ -29,4 +36,3 @@
2936
}
3037
</section>
3138
</DemoBlock>
32-

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,8 @@
20182018
"Dom2ImageIntro": "Export HTML snippets as images",
20192019
"Dom2ImageNormalIntro": "Convert the node to an image by specifying a <code>Selector</code>",
20202020
"Dom2ImageNormalTitle": "Basic usage",
2021+
"Dom2ImageServiceInjectTip": "Before using <code>IDom2HtmlService</code>, manually register this service",
2022+
"Dom2ImageSignalRConfigTip": "Also configure the SignalR maximum receive message size (example: <code>10 MB</code>)",
20212023
"Dom2ImageTitle": "Dom2Image"
20222024
},
20232025
"BootstrapBlazor.Server.Components.Samples.Downloads": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,8 @@
20182018
"Dom2ImageIntro": "将 Html 片段导出为图片",
20192019
"Dom2ImageNormalIntro": "通过指定 <code>Selector</code> 将此节点转成图片",
20202020
"Dom2ImageNormalTitle": "基本用法",
2021+
"Dom2ImageServiceInjectTip": "使用 <code>IDom2HtmlService</code> 前请先手动注入服务",
2022+
"Dom2ImageSignalRConfigTip": "同时请配置 SignalR 的最大接收消息大小(示例为 <code>10 MB</code>)",
20212023
"Dom2ImageTitle": "Dom2Image 元素转图片"
20222024
},
20232025
"BootstrapBlazor.Server.Components.Samples.Downloads": {

0 commit comments

Comments
 (0)