Contain dpdated ANSI parsing and Formatted Text processing.



Concatenate all the text parts again.


Take a single list of (style_str, text) tuples and yield one such list for each line.


Accept both booleans and Filters as input and turn it into a Filter.

to_formatted_text(value[, style, auto_convert])

Convert the given value (which can be formatted text) into a list of text fragments.


ConditionalMargin(margin, filter)

Wrapper around other Margin classes to show/hide them.


Processor class that dynamically returns any Processor.

FormattedTextArea(formatted_text, *args[, ...])

Apply formatted text to a TextArea.


Apply formatted text to a TextArea.

NumberedMargin([diagnostics, show_diagnostics])

Margin that displays the line numbers of a Window.


Manipulate the fragments for a given line in a BufferControl.

TextArea([text, multiline, password, lexer, ...])

A simple input field.

Transformation(fragments[, ...])

Transformation result, as returned by Processor.apply_transformation().

class euporie.core.widgets.formatted_text_area.FormattedTextArea(formatted_text: AnyFormattedText, *args: Any, line_numbers: FilterOrBool = False, **kwargs: Any)

Bases: TextArea

Apply formatted text to a TextArea.

property accept_handler: Optional[Callable[[Buffer], bool]]

The accept handler. Called when the user accepts the input.

property document: Document

The Buffer document (text + cursor position).

property formatted_text: StyleAndTextTuples

The formatted text.

get_processor() FormattedTextProcessor

Generate a processor for the formatted text.

property text: str

The Buffer text.

class euporie.core.widgets.formatted_text_area.FormattedTextProcessor(formatted_text: StyleAndTextTuples)

Bases: Processor

Apply formatted text to a TextArea.

apply_transformation(transformation_input: TransformationInput) Transformation

Apply text formatting to a line in a buffer.