Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

Text fields


A text field is a charfield which can contain more than one line of text. Unlike a charfield it has a flexible height in layouts.

A plain text field is a text field without any formatting instructions.

A rich text fields can contain simple HTML formatting like character style, links, tables, headers, enumerations, … This content can be both limited* (see Bleaching) and enhanced (see memo : The memo parser).

Both types of text fields are specified using the RichTextField class exposed in lino.api.dd

class lino.core.fields.RichTextField

A thin wrapper around Django’s models.TextField class, but you can specify two additional keyword arguments textfield_format and bleached.

You may also specify a keyword format when instantiating a RichTextField, which will be stored to textfield_format.


Override the global lino.core.site.Site.textfield_format setting.


See Bleaching.

class lino.core.fields.PreviewTextField

A text field that is previewable and editable at the same time.

I currently works only on the lino.modlib.memo.mixins.Previewable.body