formatus library

Classes

FormatusActionText
Format action displaying given text. typography defaults to normal text.
FormatusAnchor
Used for FormatusBar callback onEditAnchor.
FormatusAnchorSpan
Marker span produced by FormatusResults for an anchor element. Carries the FormatusAnchor so FormatusViewer can give it to AnchorRenderer at build time.
FormatusBar
Actions to format text.
FormatusController
FormatusController displays the tree-like structure of a FormatusDocument into TextSpan to be displayed in a TextFormField.
FormatusImage
FormatusViewer

Enums

Formatus
Formats for:
FormatusType
Type of a Formatus action

Constants

anchorChar → const String
Renders an anchor image as a single character
imagePlaceholderChar → const String
Unicode char to represent an image (renders a square) Alternative: '\uFFFC';
invisibleSpaceChar → const String
Invisible space char
kDefaultFontSize → const double
Default font size (14.0) used to scale headers
lessThan → const String
HTML string representing the smaller-than character
linkPlaceholderChar → const String
Unicode char to represent a link (infinity symbol)
noneChar → const String
Not a valid char. Used to separate words invisibly
tagStart → const String
Starting character of a HTML tag
unorderedListPrefix → const String
Prefix used for list-items inside <ul>

Properties

formatusColors ↔ List<Color>
HTML colors used in Formatus. Values are official HTML colors.
getter/setter pair

Functions

colorFromHex(String hex) → Color
colorToHex(Color color) → String
Returns Flutter color (ARGB) as an HTML hex string #RGBA

Typedefs

AnchorEditor = Future<FormatusAnchor?> Function(BuildContext context, FormatusAnchor anchor)
Signature for callback onEditAnchor
AnchorRenderer = InlineSpan? Function(BuildContext context, FormatusAnchor anchor)
Signature for callback onRenderAnchor.
ColorSelector = Future<Color?> Function(BuildContext context, Color currentColor)
Signature for callback onSelectColor
EmojiSelector = Future<String?> Function(BuildContext context)
Signature for callback onSelectEmoji
ImageSelector = Future<FormatusImage?> Function(BuildContext context, FormatusImage image)
Signature for callback `onSelectImage``
TooltipBuilder = String? Function(BuildContext context, Formatus action)
Callback invoked to supply localized tooltips to formatting actions.