Skip to content

Commit e39079d

Browse files
authored
Merge pull request #7167 from syncfusion-content/945108-FAIL
945108: Staging Failure Resolved
2 parents 5ccebab + 9f6c537 commit e39079d

File tree

4 files changed

+44
-41
lines changed

4 files changed

+44
-41
lines changed

blazor/rich-text-editor/mail-merge.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ control: RichTextEditor
77
documentation: ug
88
---
99

10-
# Mail Merge in Blazor Rich Text Editor
10+
# Mail merge in Blazor Rich Text Editor Control
1111

12-
The Mail Merge feature in Blazor Rich Text Editor enables developers to create dynamic, personalized documents by inserting placeholders (merge fields) into the editor content. These placeholders are later replaced with actual data at runtime, making it ideal for generating letters, invoices, and bulk communication templates.
12+
The Mail merge feature in Blazor Rich Text Editor enables developers to create dynamic, personalized documents by inserting placeholders (merge fields) into the editor content. These placeholders are later replaced with actual data at runtime, making it ideal for generating letters, invoices, and bulk communication templates.
1313

14-
## Rendering Custom Toolbar Items
14+
## Rendering custom toolbar items
1515

1616
Custom toolbar items are added using the [RichTextEditorCustomToolbarItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorCustomToolbarItems.html) tag. Each item is defined with:
1717

@@ -46,11 +46,11 @@ Custom toolbar items are added using the [RichTextEditorCustomToolbarItems](http
4646
{% endhighlight %}
4747
{% endtabs %}
4848

49-
## Populating and Using Insert Field Dropdown
49+
## Populating and using insert field dropdown
5050

5151
The `Insert Field` dropdown in the Rich Text Editor is designed to let users quickly insert predefined merge fields into the editor content. This dropdown is powered by the `SfDropDownButton` control, which uses its [Items](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SplitButtons.SfDropDownButton.html#Syncfusion_Blazor_SplitButtons_SfDropDownButton_Items) property to bind a collection of menu items.
5252

53-
### How the Items Property Works
53+
### How the items property works
5454

5555
- The `Items` property accepts a list of [DropDownMenuItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SplitButtons.DropDownMenuItem.html) objects.
5656
- Each item in this list represents a merge field and contains a [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SplitButtons.DropDownMenuItem.html#Syncfusion_Blazor_SplitButtons_DropDownMenuItem_Text) property, which is displayed in the dropdown.
@@ -97,15 +97,15 @@ When the user selects an item from the dropdown:
9797
if (args.Item.Text != null)
9898
{
9999
var value = _mergeData.FirstOrDefault(md => md.Text == args.Item.Text)?.Value;
100-
string htmlContent = $"<span contenteditable=\"false\" class=\"e-mention-chip\"><span>{{{{{value}}}}}</span></span> ";
100+
string htmlContent = $"<span contenteditable=\"false\" class=\"e-mention-chip\"><span>{{\"{{' + value + '}}\"}}</span></span> ";
101101
var undoOption = new ExecuteCommandOption { Undo = true };
102102
this._mailMergeEditor.ExecuteCommandAsync(CommandName.InsertHTML, htmlContent, undoOption);
103103
await this._mailMergeEditor.SaveSelectionAsync();
104104
}
105105
}
106106
```
107107

108-
## Role of Mention Control in Mail Merge
108+
## Role of Mention control in mail merge
109109

110110
Mention control enhances usability by enabling inline field suggestions:
111111

@@ -118,7 +118,9 @@ Mention control enhances usability by enabling inline field suggestions:
118118

119119
<SfMention DataSource="_mergeData" TItem="MergeData" Target="#_mailMergeEditor" MentionChar="_mentionChar" AllowSpaces="true" PopupWidth='250px' PopupHeight='200px' @ref="mentionObj">
120120
<DisplayTemplate>
121-
<span>{{@((context as MergeData).Value)}}</span>
121+
{% raw %}
122+
<span>@((context as MergeData).Value)</span>
123+
{% endraw %}
122124
</DisplayTemplate>
123125
<ChildContent>
124126
<MentionFieldSettings Text="Text"></MentionFieldSettings>
@@ -130,7 +132,7 @@ Mention control enhances usability by enabling inline field suggestions:
130132

131133
This feature is ideal for users who prefer keyboard-driven workflows.
132134

133-
## Maintaining Cursor Position During Dropdown Operations
135+
## Maintaining cursor position during dropdown operations
134136

135137
When the `Insert Field` dropdown opens, the editor loses its current selection because focus shifts to the popup. To ensure the placeholder is inserted at the correct position:
136138

@@ -156,7 +158,7 @@ When the `Insert Field` dropdown opens, the editor loses its current selection b
156158
}
157159
```
158160

159-
## Handling Editor Mode Changes with OnActionComplete
161+
## Handling editor mode changes with OnActionComplete
160162

161163
The [OnActionComplete](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.RichTextEditorEvents.html#Syncfusion_Blazor_RichTextEditor_RichTextEditorEvents_OnActionComplete) event fires after specific actions in the RichTextEditor, such as switching between Source Code and Preview modes.
162164

@@ -183,7 +185,7 @@ The [OnActionComplete](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.R
183185

184186
**Why is this important?** This prevents users from triggering merge operations or inserting fields while editing raw HTML, which could cause unexpected behavior.
185187

186-
## Executing Merge Data Action
188+
## Executing merge data action
187189

188190
When the `Merge Data` button is clicked:
189191

@@ -202,9 +204,10 @@ When the `Merge Data` button is clicked:
202204
_rteValue = mergedContent;
203205
}
204206
}
205-
public static string ReplacePlaceholders(string template, Dictionary<string, string> data)
207+
208+
public static string ReplacePlaceholders(string template, Dictionary<string, string> data)
206209
{
207-
return Regex.Replace(template, @"{{\s*(\w+)\s*}}", match =>
210+
return Regex.Replace(template, @"{{{{\s*(\w+)\s*}}}}", match =>
208211
{
209212
string key = match.Groups[1].Value.Trim();
210213
return data.TryGetValue(key, out var value) ? value : match.Value;
@@ -222,6 +225,6 @@ This ensures all placeholders are dynamically replaced without manual editing.
222225

223226
![Blazor RichTextEditor Mail Merge](./images/blazor-richtexteditor-mail-merge.png)
224227

225-
## Related Resources
228+
## Related resources
226229

227230
[Mention Control Guide](https://blazor.syncfusion.com/documentation/mention/getting-started-webapp)

blazor/smart-ai-solutions/ai-samples/kanban/sentiment-analysis.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Ensure the following NuGet packages are installed based on your chosen AI servic
3030
- **OllamaSharp**
3131

3232
{% tabs %}
33-
{% highlight C# tabtitle="Package Manager" %}
33+
{% highlight csharp tabtitle="Package Manager" %}
3434

3535
Install-Package Syncfusion.Blazor.Kanban -Version {{ site.releaseversion }}
3636
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
@@ -77,7 +77,7 @@ Generate an API key from OpenAI and set `openAIApiKey`. Specify the desired mode
7777
- Install the required NuGet packages:
7878

7979
{% tabs %}
80-
{% highlight C# tabtitle="Package Manager" %}
80+
{% highlight csharp tabtitle="Package Manager" %}
8181

8282
Install-Package Microsoft.Extensions.AI
8383
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -88,7 +88,7 @@ Install-Package Microsoft.Extensions.AI.OpenAI
8888
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
8989

9090
{% tabs %}
91-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
91+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
9292

9393
using Syncfusion.Blazor.AI;
9494
using Microsoft.Extensions.AI;
@@ -115,7 +115,7 @@ Deploy an Azure OpenAI Service resource and model as described in [Microsoft's d
115115
- Install the required NuGet packages:
116116

117117
{% tabs %}
118-
{% highlight C# tabtitle="Package Manager" %}
118+
{% highlight csharp tabtitle="Package Manager" %}
119119

120120
Install-Package Microsoft.Extensions.AI
121121
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -127,7 +127,7 @@ Install-Package Azure.AI.OpenAI
127127
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
128128

129129
{% tabs %}
130-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
130+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
131131

132132
using Syncfusion.Blazor.AI;
133133
using Azure.AI.OpenAI;
@@ -163,7 +163,7 @@ To use Ollama for self-hosted AI models:
163163
- Install the required NuGet packages:
164164

165165
{% tabs %}
166-
{% highlight C# tabtitle="Package Manager" %}
166+
{% highlight csharp tabtitle="Package Manager" %}
167167

168168
Install-Package Microsoft.Extensions.AI
169169
Install-Package OllamaSharp
@@ -174,7 +174,7 @@ Install-Package OllamaSharp
174174
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
175175

176176
{% tabs %}
177-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
177+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
178178

179179
using Syncfusion.Blazor.AI;
180180
using Microsoft.Extensions.AI;
@@ -202,7 +202,7 @@ Add the Syncfusion Blazor service to your **~/Program.cs** file. The configurati
202202
- **WebAssembly or Auto Mode**: Register the service in both the server-side **~/Program.cs** and client-side **~/Program.cs** files.
203203

204204
{% tabs %}
205-
{% highlight C# tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
205+
{% highlight csharp tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
206206

207207
using Syncfusion.Blazor;
208208

@@ -216,7 +216,7 @@ builder.Services.AddSyncfusionBlazor();
216216
var app = builder.Build();
217217

218218
{% endhighlight %}
219-
{% highlight C# tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
219+
{% highlight csharp tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
220220

221221
using Syncfusion.Blazor;
222222

blazor/smart-ai-solutions/ai-samples/kanban/smart-task-suggestion.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Ensure the following NuGet packages are installed based on your chosen AI servic
3030
- **OllamaSharp**
3131

3232
{% tabs %}
33-
{% highlight C# tabtitle="Package Manager" %}
33+
{% highlight csharp tabtitle="Package Manager" %}
3434

3535
Install-Package Syncfusion.Blazor.Kanban -Version {{ site.releaseversion }}
3636
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
@@ -77,7 +77,7 @@ Generate an API key from OpenAI and set `openAIApiKey`. Specify the desired mode
7777
- Install the required NuGet packages:
7878

7979
{% tabs %}
80-
{% highlight C# tabtitle="Package Manager" %}
80+
{% highlight csharp tabtitle="Package Manager" %}
8181

8282
Install-Package Microsoft.Extensions.AI
8383
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -88,7 +88,7 @@ Install-Package Microsoft.Extensions.AI.OpenAI
8888
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
8989

9090
{% tabs %}
91-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
91+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
9292

9393
using Syncfusion.Blazor.AI;
9494
using Microsoft.Extensions.AI;
@@ -115,7 +115,7 @@ Deploy an Azure OpenAI Service resource and model as described in [Microsoft's d
115115
- Install the required NuGet packages:
116116

117117
{% tabs %}
118-
{% highlight C# tabtitle="Package Manager" %}
118+
{% highlight csharp tabtitle="Package Manager" %}
119119

120120
Install-Package Microsoft.Extensions.AI
121121
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -127,7 +127,7 @@ Install-Package Azure.AI.OpenAI
127127
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
128128

129129
{% tabs %}
130-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
130+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
131131

132132
using Syncfusion.Blazor.AI;
133133
using Azure.AI.OpenAI;
@@ -163,7 +163,7 @@ To use Ollama for self-hosted AI models:
163163
- Install the required NuGet packages:
164164

165165
{% tabs %}
166-
{% highlight C# tabtitle="Package Manager" %}
166+
{% highlight csharp tabtitle="Package Manager" %}
167167

168168
Install-Package Microsoft.Extensions.AI
169169
Install-Package OllamaSharp
@@ -174,7 +174,7 @@ Install-Package OllamaSharp
174174
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
175175

176176
{% tabs %}
177-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
177+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
178178

179179
using Syncfusion.Blazor.AI;
180180
using Microsoft.Extensions.AI;
@@ -202,7 +202,7 @@ Add the Syncfusion Blazor service to your **~/Program.cs** file. The configurati
202202
- **WebAssembly or Auto Mode**: Register the service in both the server-side **~/Program.cs** and client-side **~/Program.cs** files.
203203

204204
{% tabs %}
205-
{% highlight C# tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
205+
{% highlight csharp tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
206206

207207
using Syncfusion.Blazor;
208208

@@ -216,7 +216,7 @@ builder.Services.AddSyncfusionBlazor();
216216
var app = builder.Build();
217217

218218
{% endhighlight %}
219-
{% highlight C# tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
219+
{% highlight csharp tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
220220

221221
using Syncfusion.Blazor;
222222

blazor/smart-ai-solutions/ai-samples/rich-text-editor/writting-assistance.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Ensure the following NuGet packages are installed based on your chosen AI servic
3030
- **OllamaSharp**
3131

3232
{% tabs %}
33-
{% highlight C# tabtitle="Package Manager" %}
33+
{% highlight csharp tabtitle="Package Manager" %}
3434

3535
Install-Package Syncfusion.Blazor.RichTextEditor -Version {{ site.releaseversion }}
3636
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
@@ -77,7 +77,7 @@ Generate an API key from OpenAI and set `openAIApiKey`. Specify the desired mode
7777
- Install the required NuGet packages:
7878

7979
{% tabs %}
80-
{% highlight C# tabtitle="Package Manager" %}
80+
{% highlight csharp tabtitle="Package Manager" %}
8181

8282
Install-Package Microsoft.Extensions.AI
8383
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -88,7 +88,7 @@ Install-Package Microsoft.Extensions.AI.OpenAI
8888
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
8989

9090
{% tabs %}
91-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
91+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
9292

9393
using Syncfusion.Blazor.AI;
9494
using Microsoft.Extensions.AI;
@@ -115,7 +115,7 @@ Deploy an Azure OpenAI Service resource and model as described in [Microsoft's d
115115
- Install the required NuGet packages:
116116

117117
{% tabs %}
118-
{% highlight C# tabtitle="Package Manager" %}
118+
{% highlight csharp tabtitle="Package Manager" %}
119119

120120
Install-Package Microsoft.Extensions.AI
121121
Install-Package Microsoft.Extensions.AI.OpenAI
@@ -127,7 +127,7 @@ Install-Package Azure.AI.OpenAI
127127
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
128128

129129
{% tabs %}
130-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
130+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
131131

132132
using Syncfusion.Blazor.AI;
133133
using Azure.AI.OpenAI;
@@ -163,7 +163,7 @@ To use Ollama for self-hosted AI models:
163163
- Install the required NuGet packages:
164164

165165
{% tabs %}
166-
{% highlight C# tabtitle="Package Manager" %}
166+
{% highlight csharp tabtitle="Package Manager" %}
167167

168168
Install-Package Microsoft.Extensions.AI
169169
Install-Package OllamaSharp
@@ -174,7 +174,7 @@ Install-Package OllamaSharp
174174
- Add the following to the **~/Program.cs** file in your Blazor WebApp:
175175

176176
{% tabs %}
177-
{% highlight C# tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
177+
{% highlight csharp tabtitle="Blazor WebApp" hl_lines="7 8 9 11 12 13" %}
178178

179179
using Syncfusion.Blazor.AI;
180180
using Microsoft.Extensions.AI;
@@ -202,7 +202,7 @@ Add the Syncfusion Blazor service to your **~/Program.cs** file. The configurati
202202
- **WebAssembly or Auto Mode**: Register the service in both the server-side **~/Program.cs** and client-side **~/Program.cs** files.
203203

204204
{% tabs %}
205-
{% highlight C# tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
205+
{% highlight csharp tabtitle="Server (~/_Program.cs)" hl_lines="3 11" %}
206206

207207
using Syncfusion.Blazor;
208208

@@ -216,7 +216,7 @@ builder.Services.AddSyncfusionBlazor();
216216
var app = builder.Build();
217217

218218
{% endhighlight %}
219-
{% highlight C# tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
219+
{% highlight csharp tabtitle="Client (~/_Program.cs)" hl_lines="2 5" %}
220220

221221
using Syncfusion.Blazor;
222222

0 commit comments

Comments
 (0)