Skip to content

Paste

The Paste event is sent to a widget when the user pastes text.

  • Bubbles
  • Verbose

Attributes

attribute type purpose
text str The text that was pasted

Code

textual.events.Paste class

def __init__(self, text):

Bases: Event

Event containing text that was pasted into the Textual application. This event will only appear when running in a terminal emulator that supports bracketed paste mode. Textual will enable bracketed pastes when an app starts, and disable it when the app shuts down.

  • Bubbles
  • Verbose
Parameters
Name Type Description Default
text str

The text that has been pasted.

required