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
7 changes: 6 additions & 1 deletion Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,12 @@
<li><a href="/document-processing/pdf/pdf-viewer/react/text-selection">Text Selection</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/globalization">Globalization</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/accessibility">Accessibility</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/context-menu/context-menu">Context Menu</a>
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/react/context-menu/builtin-context-menu">Built-in Context Menu</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/context-menu/custom-context-menu">Customize Context Menu</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to-overview">How to</a>
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/load-document">Load the PDF documents dynamically</a></li>
Expand All @@ -1042,7 +1048,6 @@
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/retry-timeout">Retry Timeout</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/load-n-number-page">Load N number of pages on initial loading</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/conformance">Supported conformance documents</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/custom-context-menu">Customize context menu</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/pagerenderstarted-pagerendercompleted-event">PageRenderInitiate and PageRenderComplete event</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/open-bookmark">Open and Close Bookmark pane programmatically</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/signatureselect-signatureunselect">SignatureSelect and SignatureUnselect event</a></li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
layout: post
title: Built-in Context Menu in React PDF Viewer | Syncfusion
description: Explore the default context menu items in the React PDF Viewer, including options for text selection, annotations, and form fields.
control: PDF Viewer
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---

# Built-in Context Menu Items in React PDF Viewer

The React PDF Viewer includes a context-sensitive menu that updates dynamically based on the right-clicked element within the document. This page lists the default menu items available for different document elements.

## Context Menu Scenarios

Menu items vary depending on the target element:

* **Text**: Displays options to annotate and copy selected text.
![context menu on text](../images/context-menu-text.png)
* **Annotations**: Provides options to copy, cut, paste, or remove annotations, and add comments.
![context menu on annotation](../images/context-menu-annotation.png)
* **Form Fields**: Shows standard form field interactions, such as modifying properties. The context menu for form fields appears only when the viewer is in **designer mode**.
![context menu on form fields](../images/context-menu-forms.png)
* **Empty Space**: Displays the option to paste a previously copied annotation or form field.
![context menu on empty space](../images/context-menu-empty.png)

## Default Item Reference

### Text Menu Items

The following table describes the default items available when right-clicking selected text:

| Item | Description |
| :--- | :--- |
| **Copy** | Copies selected text to the clipboard. |
| **Highlight** | Highlights selected text using the default highlight color. |
| **Underline** | Applies an underline to the selected text. |
| **Strikethrough** | Applies a strikethrough to the selected text. |
| **Squiggly** | Applies a squiggly underline to the selected text. |
| **Redact Text** | Redacts the selected text. |

### Annotation Menu Items

The following items are available when interacting with annotations:

| Item | Description |
| :--- | :--- |
| **Copy** | Copies the selected annotation for pasting within the same page. |
| **Cut** | Removes the selected annotation and copies it to the clipboard. |
| **Paste** | Pastes a previously copied or cut annotation. |
| **Delete** | Permanently removes the selected annotation. |
| **Comments** | Opens the comment panel to manage discussions on the annotation. |

### Form Field Menu Items

These items appear when the viewer is in designer mode and a form field is selected:

| Item | Description |
| :--- | : :--- |
| **Copy** | Copies the selected form field for duplication. |
| **Cut** | Removes the selected form field for relocation. |
| **Paste** | Pastes a copied or cut form field. |
| **Delete** | Removes the selected form field from the document. |
| **Properties** | Launches the properties dialog for the specific form field. |

N> The availability of the context menu is a client-side feature and is independent of server configurations.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: post
title: Context Menu in React PDF Viewer | Syncfusion
description: Learn about the contextual menu options in the Syncfusion React PDF Viewer, including default behavior and customization possibilities.
control: PDF Viewer
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---

# Context Menu in React PDF Viewer

The React PDF Viewer provides a built-in context menu for interacting with text, annotations, form fields, and document elements. This feature enhances the user experience by offering quick access to relevant actions based on the current selection or the specific area of the document being interacted with.

## Understanding the Context Menu

The context menu is designed to be context-aware, meaning it dynamically updates its items based on the target element. For instance, right-clicking on selected text will show annotation options, while right-clicking on an annotation will display management options like copy, cut, and delete.

### Core Capabilities

The context menu supports several configurations:

* **Default Behavior**: Provides standard actions such as cut, copy, and annotation management.
* **Customization**: Allows adding new menu items, removing default ones, or reordering them to meet specific application requirements.
* **Granular Control**: Developers can fully disable the menu or replace it with custom logic using events.

### Client-side Interaction

The availability and behavior of the context menu are governed primarily by client-side logic. It is not affected by server-side configurations or cloud environments, ensuring consistent performance across different deployment scenarios.

## Further Reading

* [Built-in Context Menu](builtin-context-menu) – A technical reference for default menu behavior and items.
* [Customize Context Menu](custom-context-menu) – A guide on how to implement custom menu items and dynamic updates.
Loading