Skip to content

Commit 1c7c4d0

Browse files
committed
990376: Added ug documentation for clipboard cleanup feature.
1 parent c24d1c8 commit 1c7c4d0

File tree

6 files changed

+65
-0
lines changed

6 files changed

+65
-0
lines changed

blazor-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4156,6 +4156,7 @@
41564156
<li><a href="/blazor/rich-text-editor/tools/table-manipulation">Table manipulation</a></li>
41574157
<li><a href="/blazor/rich-text-editor/tools/code-block">Code Block</a></li>
41584158
<li> <a href="/blazor/rich-text-editor/paste-cleanup">Paste Clean-up</a></li>
4159+
<li> <a href="/blazor/rich-text-editor/clipboard-cleanup">Clipboard Clean-up</a></li>
41594160
<li> <a href="/blazor/rich-text-editor/enter-key">Enter Key Configuration</a></li>
41604161
<li> <a href="/blazor/rich-text-editor/undo-redo-manager">Undo Redo Manager</a></li>
41614162
<li> <a href="/blazor/rich-text-editor/import-and-export">Import/Export</a></li>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: post
3+
title: Clipboard Clean-up in Blazor Rich Text Editor | Syncfusion
4+
description: Checkout and learn here all about Clipboard Clean-up in Syncfusion Blazor Rich Text Editor component and more.
5+
platform: Blazor
6+
control: RichTextEditor
7+
documentation: ug
8+
---
9+
10+
# Clipboard Clean-up in Blazor Rich Text Editor
11+
12+
The Rich Text Editor now provides automatic cleanup of clipboard content during copy (`Ctrl + C`) and cut (`Ctrl + X`) operations. When this feature is enabled, unwanted inline styles are removed while preserving important structural elements such as tables, lists, and images. This feature is enabled by default through [`EnableClipboardCleanup`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.SfRichTextEditor.html#Syncfusion_Blazor_RichTextEditor_SfRichTextEditor_EnableClipboardCleanup) property.
13+
14+
It can be verified by following the below steps:
15+
16+
- Copy or cut content within the Rich Text Editor.
17+
- Paste the content back into the editor.
18+
- Observe that unnecessary inline styles are removed while essential elements such as tables, lists, and images remain intact.
19+
20+
By default, `EnableClipboardCleanup` is set to `true`. Check with the below demonstration:
21+
22+
{% tabs %}
23+
{% highlight razor %}
24+
25+
{% include_relative code-snippet/clipboard-cleanup-default.razor %}
26+
27+
{% endhighlight %}
28+
{% endtabs %}
29+
30+
![Blazor RichTextEditor with default clipboard cleanup](./images/blazor-richtexteditor-clipboard-cleanup-default.png)
31+
32+
When set to `false,` the browser’s default copy and cut behavior applies. Check with the below demonstration:
33+
34+
{% tabs %}
35+
{% highlight razor %}
36+
37+
{% include_relative code-snippet/clipboard-cleanup-custom.razor %}
38+
39+
{% endhighlight %}
40+
{% endtabs %}
41+
42+
![Blazor RichTextEditor with clipboard cleanup disabled](./images/blazor-richtexteditor-clipboard-cleanup-custom.png)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.Blazor.RichTextEditor
2+
3+
<SfRichTextEditor EnableClipboardCleanup="false">
4+
<h3>Clipboard Cleanup Disabled</h3>
5+
<p>The Rich Text Editor uses the browser’s default copy and cut behavior when clipboard cleanup is disabled.</p>
6+
<p><b>Key Points:</b></p>
7+
<ul>
8+
<li>No cleanup is applied; original styles remain intact.</li>
9+
<li>Content is copied exactly as it appears in the editor.</li>
10+
</ul>
11+
</SfRichTextEditor>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.Blazor.RichTextEditor
2+
3+
<SfRichTextEditor>
4+
<h3>Clipboard Cleanup – Default Behavior</h3>
5+
<p>The Rich Text Editor automatically cleans up clipboard content during copy and cut operations to ensure clean formatting.</p>
6+
<p><b>Key Features:</b></p>
7+
<ul>
8+
<li>Removes unwanted inline styles from copied or cut content.</li>
9+
<li>Preserves essential elements like tables, lists, and images.</li>
10+
</ul>
11+
</SfRichTextEditor>
30.1 KB
Loading
5.7 KB
Loading

0 commit comments

Comments
 (0)