Clipboard modes
Two clipboards, one editor
Choose where copied content should travel. TX Text Control switches the keyboard shortcuts and ribbon commands to the selected clipboard automatically.
Current modeWaiting for the editor
Reading clipboard settings
Word or desktop app
Local clipboard
Document Editor
Choose a clipboard
Changes immediately
Try the active mode
Select formatted content in the editor, copy it, and paste it into Microsoft Word or another local application.
Ctrl+CCopy
Ctrl+VPaste
Ctrl+XCut
Local transferReady for a selection
0%
When local mode prepares rich content for copying, its progress appears here.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Why a web editor needs two clipboards
Browsers deliberately restrict operating-system clipboard access. TX Text Control provides a local clipboard for desktop interoperability and a server clipboard for unrestricted document-internal operations.
Clipboard selection
TXTextControl.clipboardMode
Available modes
TXTextControl.ClipboardMode.Client / Server
Mode synchronization
clipboardModeChanged
Transfer feedback
clipboardDataTransferStart / Progress / Complete / Aborted
How it works
In ClipboardMode.Client, Ctrl+C, Ctrl+V, and Ctrl+X exchange content with the local computer. The editor accepts RTF, HTML, plain text, and images. Rich Text Format can be processed directly, preserving sophisticated Word-compatible formatting instead of flattening everything to HTML.
In ClipboardMode.Server, the same commands use TX Text Control's internal clipboard stack. This mode is intended for operations inside the editor and can retain the complete document model, including elements that a browser clipboard cannot represent reliably.
Assigning TXTextControl.clipboardMode changes the active mode. The clipboardModeChanged event also captures changes made through the ribbon, keeping custom UI synchronized with the editor.
Preparing complex rich content for the local clipboard can take time. The clipboardDataTransferStart, clipboardDataTransferProgress, clipboardDataTransferComplete, and clipboardDataTransferAborted events provide the state used by this demo's progress indicator.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0