Same as init but you pss in lists of Html.Styled.Attributes in Parameters.
id must be unique; it is used to monitor the position of characters.
content is the initial content of the textarea. It can be Just some plain text or a json string generated by encodedContent.
fontSizeUnit defaults to "px".
highlighter runs before each view update and it re-styles the text. See the example.
indentUnit defaults to (50,"px").
selectionStyle controls the appearance of selected text. It defaults to [("background", "hsl(217,71%,53%)"), ("color", "white")].
styling.active styles the textarea in active mode (when editing). Use update (Active True/False) to switch between modes.
tagger turns the package's own Msg type into your app's msg.
Displays the edited text plus the cursor. This object must not be the child of a position: relative node. It screws up cursor placement.
Same as textarea but outputs Html.Styled.Html.
Display formatted text, without an editor.
If you want to preserve the option of editing it, create an editor with init and put it in passive mode with update (Active False).
content can be plain text or a json string created with encodedContent.
fontSizeUnit defaults to "px".
indentUnit defaults to (50,"px").
For toolbar icons or shortcut keys. See the example for tips.
Active Bool -- turn editing on/off
| AddText String -- insert text
| Bold -- make text bold
| Class String -- put a class on current paragraph
| Core MiniRte.Core.Msg -- normally, you won't need this
| Cut
| Copy
| Font (List String)-- set current font families
-- e.g. ["Oswald", "sans-serif"]
| FontSize Float -- set current font size
| FromBrowserClipboard String
-- see package description
| Heading -- toggles between h1 and plain div
| ImageAdd String -- embed image (the String is a link)
| ImageInput String -- normally, you won't need this
| Indent -- increase indent of current para
| Italic -- make text italic
| LinkAdd String -- add link to current selection
| LinkInput String -- normally, you won't need this
| NoOp -- normally, you won't need this
| StrikeThrough -- cross out text
| TextAlign MiniRte.Types.TextAlign
-- change alignment of current para
| ToBrowserClipboard String
-- see package description
| ToggleEmojiBox -- turn emoji input box on/off
| ToggleImageBox -- turn image link input box on/off
| ToggleLinkBox -- turn link input box on/off
| Underline -- underline text
| Undo -- undo last action
| Unindent -- decrease indent of current para
| Unlink -- remove the link the cursor is touchingChecks if the editor is active. Suitable for both Rte and RteStyled.
The plain text content of the textarea. Suitable for both Rte and RteStyled.