Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Accessibility in Blazor DocumentEditor Component

The [Blazor Document Editor](https://www.syncfusion.com/blazor-components/blazor-word-processor) component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria#roles) that are commonly used to evaluate accessibility.
The [Blazor Document Editor](https://www.syncfusion.com/blazor-components/blazor-word-processor) component follows the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria#roles) that are commonly used to evaluate accessibility.

The accessibility compliance for the Blazor Document Editor component is outlined below.

Expand Down Expand Up @@ -38,6 +38,8 @@ The accessibility compliance for the Blazor Document Editor component is outline

## Keyboard interaction

The Document Editor supports a wide range of keyboard shortcuts to facilitate common actions, including text formatting, paragraph formatting, navigation, and editing.

### Text formatting

The following table lists the default keyboard shortcuts in document editor for formatting text:
Expand Down
30 changes: 16 additions & 14 deletions Document-Processing/Word/Word-Processor/blazor/bookmark.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
---
layout: post
title: Bookmarks in Blazor DocumentEditor Component | Syncfusion
description: Checkout and learn here all about the Bookmarks in Syncfusion Blazor DocumentEditor component and more.
description: Learn how to add, navigate, and manage bookmarks in the Syncfusion Blazor Document Editor component both through the UI and programmatically.
platform: document-processing
control: DocumentEditor
documentation: ug
---

# Bookmarks in Blazor DocumentEditor Component

Bookmark is a powerful tool that helps you to mark a place in the document to find again easily. You can enter many bookmarks in the document and give each one a unique name to identify easily.
A bookmark is a powerful tool that marks a specific place in a document so you can easily find it again. You can insert multiple bookmarks in a document and give each one a unique name for easy identification.

[`Blazor Word Processor`](https://www.syncfusion.com/blazor-components/blazor-word-processor) component (a.k.a Document Editor) component provides built-in dialog and using code to add, delete, and navigate bookmarks within the document. To add a bookmark, select a portion of text in the document. After that, jump to the location or add links to it within the document using built-in hyperlink dialog. You can also delete bookmarks from a document.
The [Blazor Word Processor](https://www.syncfusion.com/blazor-components/blazor-word-processor) (Document Editor) provides two ways to manage bookmarks: through a built-in dialog or programmatically using API methods. Once a bookmark is added, you can jump to its location or create hyperlinks to it.

N>Bookmark names need to begin with a letter. They can include both numbers and letters, but not spaces. To separate the words, use an underscore. Bookmark names starting with an underscore are called hidden bookmarks. For example, bookmarks generated for table of contents.

You can open the bookmark dialog using Bookmark options in toolbar. You can also explore our [`Blazor Word Processor - Bookmark`](https://blazor.syncfusion.com/demos/document-editor/hyperlinks-and-bookmarks) example to know more about bookmark.
The bookmark dialog can be opened using the Bookmark option in the toolbar. For more details on bookmark functionality, refer to the [`Blazor Word Processor - Bookmark`](https://document.syncfusion.com/demos/docx-editor/blazor-server/document-editor/hyperlinks-and-bookmarks) example.


## Add bookmark
## Add a bookmark

Using [`InsertBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_InsertBookmarkAsync_System_String_) method, Bookmark can be added to the selected text.
Use the [`InsertBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_InsertBookmarkAsync_System_String_) method to add a bookmark to the currently selected text.

```csharp
await container.DocumentEditor.Editor.InsertBookmarkAsync("Bookmark1");
```

## Select Bookmark
## Navigate to a bookmark

You can select the bookmark in the document using [`SelectBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectBookmarkAsync_System_String_) method by providing Bookmark name to select as shown in the following code snippet.
## Navigate to a bookmark
Use the [`SelectBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_SelectBookmarkAsync_System_String_) method to navigate to and select a bookmark by its name.

```csharp
await container.DocumentEditor.Selection.SelectBookmarkAsync("Bookmark1");
```

## Delete Bookmark
## Delete a Bookmark

You can delete bookmark in the document using [`DeleteBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_DeleteBookmarkAsync_System_String_) method as shown in the following code snippet.
Use the [`DeleteBookmarkAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_DeleteBookmarkAsync_System_String_) method to delete a bookmark by its name.

```csharp
await container.DocumentEditor.Editor.DeleteBookmarkAsync("Bookmark1");
```

## Get Bookmark
## Get all bookmarks

You can get all the bookmarks in the document using [`GetBookmarksAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetBookmarksAsync_System_Boolean_) method as shown in the following code snippet.
Use the [`GetBookmarksAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_GetBookmarksAsync_System_Boolean_) method to retrieve a list of all bookmarks in the document.

```csharp
await container.DocumentEditor.Selection.GetBookmarksAsync(false);
// Get all bookmarks, including hidden ones.
await container.DocumentEditor.Selection.GetBookmarksAsync(true);
```

N> Parameter denotes is include hidden bookmarks. If false, ignore hidden bookmark.
N> The boolean parameter of `GetBookmarksAsync` specifies whether to include hidden bookmarks in the result. If `false`, hidden bookmarks are excluded.
77 changes: 36 additions & 41 deletions Document-Processing/Word/Word-Processor/blazor/clipboard.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,75 @@
---
layout: post
title: Clipboard in Blazor DocumentEditor Component | Syncfusion
description: Checkout and learn here all about Clipboard in Syncfusion Blazor DocumentEditor component and much more.
description: Learn how to perform cut, copy, and paste clipboard operations in the Syncfusion Blazor Document Editor component, both programmatically and through the UI.
platform: document-processing
control: DocumentEditor
documentation: ug
---

# Clipboard in Blazor DocumentEditor Component

[Blazor Word Processor](https://www.syncfusion.com/blazor-components/blazor-word-processor) component (a.k.a Document Editor) provides built-in support for clipboard operations such as cut, copy, and paste. You can perform the clipboard operations using keyboard shortcuts, touch, and keyboard interactions. Also, the same functionalities can be invoked programmatically.
The [Blazor Word Processor](https://www.syncfusion.com/blazor-components/blazor-word-processor) (Document Editor) provides built-in support for clipboard operations, including cut, copy, and paste. These actions can be performed through the toolbar, context menus, standard keyboard shortcuts, or programmatically via the component's APIs.

There is a built-in clipboard (local clipboard) with this Word processor component, which allows the users to perform cut, copy, and paste faster. If you want to use system clipboard instead of local clipboard, turn off the local clipboard by setting the [`EnableLocalPaste`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SfDocumentEditor.html#Syncfusion_Blazor_DocumentEditor_SfDocumentEditor_EnableLocalPaste) to false.
## Local vs. System Clipboard

If you need to copy or paste the contents from other applications, use system clipboard. To copy or paste the contents within the Word processor component, use local clipboard.
The Document Editor supports two clipboard modes to handle content transfer:

Let’s see how to invoke each clipboard operations using code.
* **Local Clipboard (Default)**: This is a built-in clipboard that is optimized for performance when cutting, copying, and pasting content **within** the editor itself. It is enabled by default.
* **System Clipboard**: This is the operating system's standard clipboard, which allows for transferring content between the Document Editor and other applications.

## Copy
To use the system clipboard, set the [`EnableLocalPaste`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SfDocumentEditor.html#Syncfusion_Blazor_DocumentEditor_SfDocumentEditor_EnableLocalPaste) property to `false`. When this property is false, all clipboard operations will use the system clipboard.

You can copy the selected contents using the [`CopyAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_CopyAsync) method as shown in the following code example.
## Programmatic Clipboard Operations

You can programmatically invoke clipboard operations using the editor's API methods. The following example demonstrates how to call the `CutAsync`, `CopyAsync`, and `PasteAsync` methods.

```cshtml
@using Syncfusion.Blazor.DocumentEditor

<button @onclick="CopyClick">Copy</button>
<SfDocumentEditorContainer @ref="container" EnableToolbar=true></SfDocumentEditorContainer>
<button @onclick="CutClick">Cut</button>
<button @onclick="PasteClick">Paste</button>

<SfDocumentEditorContainer @ref="container" EnableToolbar=true>
</SfDocumentEditorContainer>

@code {
SfDocumentEditorContainer container;
protected async void CopyClick(object args)

protected async void CopyClick()
{
// Copies the selected content to the clipboard.
await container.DocumentEditor.Selection.CopyAsync();
}
}
```

## Cut

You can cut the selected content using the ['Cut'](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_CutAsync) method as shown in the following code example.

```cshtml
@using Syncfusion.Blazor.DocumentEditor

<button @onclick="CutClick">Cut</button>
<SfDocumentEditorContainer @ref="container" EnableToolbar=true></SfDocumentEditorContainer>

@code {
SfDocumentEditorContainer container;
protected async void CutClick(object args)
protected async void CutClick()
{
// Cuts the selected content and moves it to the clipboard.
await container.DocumentEditor.Editor.CutAsync();
}
}

protected async void PasteClick()
{
// Pastes content from the clipboard to the current cursor position.
// This will use the local or system clipboard based on the EnableLocalPaste property.
await container.DocumentEditor.Editor.PasteAsync();
}
}
```

## Paste
### Copy

## Local paste
The [`CopyAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.SelectionModule.html#Syncfusion_Blazor_DocumentEditor_SelectionModule_CopyAsync) method copies the currently selected content in the editor to the clipboard.

The following code example shows how to perform the paste operation from the local clipboard.
### Cut

```cshtml
@using Syncfusion.Blazor.DocumentEditor
The [`CutAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_CutAsync) method removes the currently selected content from the editor and moves it to the clipboard.

<button @onclick="PasteClick">Paste</button>
<SfDocumentEditorContainer @ref="container" EnableToolbar=true EnableLocalPaste=true></SfDocumentEditorContainer>
@code {
SfDocumentEditorContainer container;
protected async void PasteClick(object args)
{
await container.DocumentEditor.Editor.PasteAsync();
}
}
### Paste

```
The [`PasteAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_PasteAsync) method inserts the content from the clipboard at the current cursor position. Its behavior depends on the `EnableLocalPaste` property:
* If `true` (default), it pastes from the editor's local clipboard.
* If `false`, it pastes from the system clipboard.

You can also explore our [Blazor Word Processor](https://document.syncfusion.com/demos/docx-editor/blazor-server/document-editor/default-functionalities) example to know how to render and configure the document editor.
Explore the [Blazor Word Processor example](https://document.syncfusion.com/demos/docx-editor/blazor-server/document-editor/default-functionalities) to see how to render and configure the Document Editor.
8 changes: 4 additions & 4 deletions Document-Processing/Word/Word-Processor/blazor/comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: post
title: Comments in Blazor DocumentEditor Component | Syncfusion
description: Checkout and learn here all about the Comments in Syncfusion Blazor DocumentEditor component and more.
description: Learn how to add, navigate, reply to, and manage comments in the Syncfusion Blazor Document Editor component, including how to use comments-only protection.
platform: document-processing
control: DocumentEditor
documentation: ug
---

# Comments in Blazor DocumentEditor Component

[`Blazor Word Processor`](https://www.syncfusion.com/blazor-components/blazor-word-processor) component (a.k.a Document Editor) component allows you to add comments to documents. You can add, navigate and remove comments using code and from the UI.
The [Blazor Word Processor](https://www.syncfusion.com/blazor-components/blazor-word-processor) (Document Editor) provides comprehensive support for adding, navigating, and managing comments within a document. These features facilitate collaborative review and feedback cycles. Operations can be performed both through the built-in user interface and programmatically using APIs.

## Add a new comment

Expand Down Expand Up @@ -47,9 +47,9 @@ You can delete all the comments in the document using [`DeleteAllCommentsAsync`]
await container.DocumentEditor.Editor.DeleteAllCommentsAsync();
```

## Protect the document in comments only mode
## Protect the Document in Comments-Only Mode

Document Editor provides support for protecting the document with `CommentsOnly` protection. In this protection, user allowed to add or edit comments alone in the document.
The Document Editor supports a special protection mode that restricts user actions to only adding or editing comments. When `CommentsOnly` protection is active, users cannot make changes to the document's content.

Document editor provides an option to protect and unprotect document using [`EnforceProtectionAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_EnforceProtectionAsync_System_String_Syncfusion_Blazor_DocumentEditor_ProtectionType_) and [`StopProtectionAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DocumentEditor.EditorModule.html#Syncfusion_Blazor_DocumentEditor_EditorModule_StopProtectionAsync_System_String_) API.

Expand Down
Loading