-
Notifications
You must be signed in to change notification settings - Fork 73
990376: Added UG Documentation for LineHeight and Clipboard cleanup feature. #7210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4d60742
990376: Added UG Documentation for LineHeight feature.
KokilaSF4836 c24d1c8
Merge branch 'development' into 990376-LineHeight
KokilaSF4836 1c7c4d0
990376: Added ug documentation for clipboard cleanup feature.
KokilaSF4836 56644fe
Update text-formatting.md
KokilaSF4836 13deafb
990376: Highlight the word LineHeight
KokilaSF4836 bb952e7
990376: Fixed formatting issues.
KokilaSF4836 577da64
Merge branch 'development' into 990376-LineHeight
KokilaSF4836 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| layout: post | ||
| title: Clipboard Clean-up in Blazor Rich Text Editor | Syncfusion | ||
| description: Checkout and learn here all about Clipboard Clean-up in Syncfusion Blazor Rich Text Editor component and more. | ||
| platform: Blazor | ||
| control: RichTextEditor | ||
| documentation: ug | ||
| --- | ||
|
|
||
| # Clipboard Clean-up in Blazor Rich Text Editor | ||
|
|
||
| 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. | ||
|
|
||
| It can be verified by following the below steps: | ||
|
|
||
| - Copy or cut content within the Rich Text Editor. | ||
| - Paste the content back into the editor. | ||
| - Observe that unnecessary inline styles are removed while essential elements such as tables, lists, and images remain intact. | ||
|
|
||
| By default, `EnableClipboardCleanup` is set to `true`. Check with the below demonstration: | ||
|
|
||
| {% tabs %} | ||
| {% highlight razor %} | ||
|
|
||
| {% include_relative code-snippet/clipboard-cleanup-default.razor %} | ||
|
|
||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
|  | ||
|
|
||
| When set to `false`, the browser’s default copy and cut behavior applies. Check with the below demonstration: | ||
|
|
||
| {% tabs %} | ||
| {% highlight razor %} | ||
|
|
||
| {% include_relative code-snippet/clipboard-cleanup-custom.razor %} | ||
|
|
||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
|  | ||
11 changes: 11 additions & 0 deletions
11
blazor/rich-text-editor/code-snippet/clipboard-cleanup-custom.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @using Syncfusion.Blazor.RichTextEditor | ||
|
|
||
| <SfRichTextEditor EnableClipboardCleanup="false"> | ||
| <h3>Clipboard Cleanup Disabled</h3> | ||
| <p>The Rich Text Editor uses the browser’s default copy and cut behavior when clipboard cleanup is disabled.</p> | ||
| <p><b>Key Points:</b></p> | ||
| <ul> | ||
| <li>No cleanup is applied; original styles remain intact.</li> | ||
| <li>Content is copied exactly as it appears in the editor.</li> | ||
| </ul> | ||
| </SfRichTextEditor> |
11 changes: 11 additions & 0 deletions
11
blazor/rich-text-editor/code-snippet/clipboard-cleanup-default.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @using Syncfusion.Blazor.RichTextEditor | ||
|
|
||
| <SfRichTextEditor> | ||
| <h3>Clipboard Cleanup – Default Behavior</h3> | ||
| <p>The Rich Text Editor automatically cleans up clipboard content during copy and cut operations to ensure clean formatting.</p> | ||
| <p><b>Key Features:</b></p> | ||
| <ul> | ||
| <li>Removes unwanted inline styles from copied or cut content.</li> | ||
| <li>Preserves essential elements like tables, lists, and images.</li> | ||
| </ul> | ||
| </SfRichTextEditor> |
Binary file added
BIN
+30.1 KB
blazor/rich-text-editor/images/blazor-richtexteditor-clipboard-cleanup-custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.7 KB
blazor/rich-text-editor/images/blazor-richtexteditor-clipboard-cleanup-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
blazor/rich-text-editor/tools/code-snippet/line-height.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| @using Syncfusion.Blazor.RichTextEditor; | ||
| <SfRichTextEditor> | ||
| <RichTextEditorToolbarSettings Items="@Items" /> | ||
| <RichTextEditorLineHeight Items="@LineHeightItems" Default="Default"></RichTextEditorLineHeight> | ||
| <p>The Rich Text Editor allows users to apply line-height (line-spacing) to elements like paragraphs, lists, headings, and table cells. You can set line height using a dedicated dropdown in the toolbar, and it is applied as inline style to the selected blocks. This feature makes text easier to read and gives better control over content layout.</p> | ||
| <p><b> Key features:</b></p> | ||
| <ul> | ||
| <li><p>Provides a <b>Line Height</b> dropdown in the toolbar for easy access.</p></li> | ||
| <li><p>Supports applying line-height to paragraphs, headings, lists, and table cells.</p></li> | ||
| <li><p>Applies line-height as inline styles for consistent and precise text rendering.</p></li> | ||
| <li><p>Ensures consistent appearance across devices and print layouts.</p></li> | ||
| <li><p>Improves text readability and overall document aesthetics.</p></li> | ||
| </ul> | ||
| </SfRichTextEditor> | ||
| @code { | ||
| private List<ToolbarItemModel> Items = new List<ToolbarItemModel>() | ||
| { | ||
| new ToolbarItemModel() { Command = ToolbarCommand.LineHeight }, | ||
| }; | ||
| private List<DropDownItemModel> LineHeightItems = new() | ||
| { | ||
| new DropDownItemModel { Text = "Default", Value = "" }, | ||
| new DropDownItemModel { Text = "1", Value = "1" }, | ||
| new DropDownItemModel { Text = "1.15", Value = "1.15" }, | ||
| new DropDownItemModel { Text = "1.5", Value = "1.5" }, | ||
| new DropDownItemModel { Text = "2", Value = "2" }, | ||
| new DropDownItemModel { Text = "2.5", Value = "2.5" }, | ||
| new DropDownItemModel { Text = "3", Value = "3" } | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.