Skip to content

Commit 7c486e2

Browse files
authored
Merge pull request #7179 from syncfusion-content/945108-failure-res
945108: Staging Failure Resolved
2 parents 04c9338 + 1caf386 commit 7c486e2

File tree

2 files changed

+6
-67
lines changed

2 files changed

+6
-67
lines changed

blazor/rich-text-editor/code-snippet/nesting-table.razor

Lines changed: 0 additions & 63 deletions
This file was deleted.

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,19 @@ When the user selects an item from the dropdown:
9292
- The snippet is inserted at the current cursor position using [ExecuteCommandAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.SfRichTextEditor.html#Syncfusion_Blazor_RichTextEditor_SfRichTextEditor_ExecuteCommandAsync_Syncfusion_Blazor_RichTextEditor_CommandName_System_String_Syncfusion_Blazor_RichTextEditor_ExecuteCommandOption_).
9393

9494
```csharp
95+
{% raw %}
9596
public async Task OnItemSelect(MenuEventArgs args)
9697
{
9798
if (args.Item.Text != null)
9899
{
99100
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> ";
101+
string htmlContent = $"<span contenteditable=\"false\" class=\"e-mention-chip\"><span>{{{{{value}}}}}</span></span>
101102
var undoOption = new ExecuteCommandOption { Undo = true };
102103
this._mailMergeEditor.ExecuteCommandAsync(CommandName.InsertHTML, htmlContent, undoOption);
103104
await this._mailMergeEditor.SaveSelectionAsync();
104105
}
105106
}
107+
{% endraw %}
106108
```
107109

108110
## Role of Mention control in mail merge
@@ -194,7 +196,7 @@ When the `Merge Data` button is clicked:
194196
- Each placeholder is replaced with its corresponding value from a dictionary.
195197

196198
```csharp
197-
199+
{% raw %}
198200
public void OnClickHandler()
199201
{
200202
if (this._mailMergeEditor != null)
@@ -207,13 +209,13 @@ When the `Merge Data` button is clicked:
207209

208210
public static string ReplacePlaceholders(string template, Dictionary<string, string> data)
209211
{
210-
return Regex.Replace(template, @"{{{{\s*(\w+)\s*}}}}", match =>
212+
return Regex.Replace(template, @"{{\s*(\w+)\s*}}", match =>
211213
{
212214
string key = match.Groups[1].Value.Trim();
213215
return data.TryGetValue(key, out var value) ? value : match.Value;
214216
});
215217
}
216-
218+
{% endraw %}
217219
```
218220
This ensures all placeholders are dynamically replaced without manual editing.
219221

0 commit comments

Comments
 (0)