PasteUnformattedAction Class
Definition
Action that pastes the clipboard content as plain text, dropping all formatting, inline wrappers, lists, tables, and metadata.
public class PasteUnformattedAction
Remarks
Probes the clipboard via
Avalonia.Controls.Documents.Primitives.Components.ClipboardOperations.TryGetPlainTextSnapshotAsync(Avalonia.Input.Platform.IClipboard,System.Threading.CancellationToken): when an
in-process snapshot is present it is lowered through
PlainTextSerializer (Serialize → Deserialize) so the source
text is preserved exactly as our serializer emits it; otherwise the
platform DataFormat.Text payload is parsed straight into a
snapshot. The resulting snapshot is grafted via
TextRange.InsertSnapshot the same way Avalonia.Controls.Documents.Primitives.Actions.PasteAction
inserts rich content.
Constructors
| Name | Description |
|---|---|
| PasteUnformattedAction | No summary available. |
PasteUnformattedAction Constructor
public PasteUnformattedAction()
Methods
| Name | Description |
|---|---|
| CanExecute | No summary available. |
| Execute | No summary available. |
| ExecuteAsync | No summary available. |
| GetState | Gets the current state of the action. Inherited from EditorAction. |
CanExecute Method
public bool CanExecute(Avalonia.Controls.Documents.Primitives.ITextEditorHost host)
Parameters
host Avalonia.Controls.Documents.Primitives.ITextEditorHost
Returns
bool
Execute Method
public void Execute(Avalonia.Controls.Documents.Primitives.ITextEditorHost host)
Parameters
ExecuteAsync Method
public System.Threading.Tasks.Task ExecuteAsync(Avalonia.Controls.Documents.Primitives.ITextEditorHost host)
Parameters
host Avalonia.Controls.Documents.Primitives.ITextEditorHost