PasteText

Forms, interaction, Unicode

Description

Replaces the active selection with caller-supplied clipboard text through one /K and OnTextEdit transaction

The session does not access a platform clipboard, so the same method works with GUI controls, remote sessions, web front ends and automated form processors

The host can sanitize or replace the proposed text in OnTextEdit before Unicode-safe /MaxLen enforcement

Declaration

function PasteText(const Text: WideString): Integer;

Parameters

TextCaller-supplied UTF-16 text proposed for the current selection

Return value

Returns 1 when the paste transaction is accepted, otherwise 0

Example

Session.PasteText(HostClipboard.GetText);

See also

ReplaceSelection, CutSelection, TPDFlibFormEditKind, TPDFlibFormSession