Textformatter class

A simple module type that provides formatting of text fields.

Please see the base Module interface for all potential methods that a Textformatter module can have.


There are 5 Textformatter types in the core, plus many more Textformatters in the modules directory.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Textformatter class also inherits all the methods and properties of: WireData and Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
format(string $str)
NoneFormat the given text string, outside of specific Page or Field context. 
formatValue(Page $page, Field $field, $value)
NoneFormat the given text string with Page and Field provided. 
install()
NonePerform any installation procedures specific to this module, if needed.
uninstall()
NonePerform any uninstall procedures specific to this module, if needed.

Additional methods and properties

In addition to the methods and properties above, Textformatter also inherits the methods and properties of these classes:

Core Textformatter types

TypeSummary
TextformatterEntitiesEntity encode ampersands, quotes (single and double) and greater-than/less-than signs using htmlspecialchars(str, ENT_QUOTES). It is recommended that you use this on all text/textarea fields except those using a rich text editor or a markup language like Markdown.
TextformatterMarkdownExtraMarkdown/Parsedown extra lightweight markup language by Emanuil Rusev. Based on Markdown by John Gruber.

See also: Textformatter modules in the modules directory

API reference based on ProcessWire core version 3.0.251