[{"name":"MiniRte","comment":"\n# Init and update\n@docs init, Rte, Parameters, subscriptions, update\n\n# View\n@docs textarea, display, DisplayParams\n\n# Toolbar\n@docs emojiBox, EmojiBoxParams, fontSelector, FontSelectorParams,\nfontSizeSelector, FontSizeSelectorParams, inputBox, InputBoxParams,\nonOffSwitch, SwitchParams\n\n# Info\n@docs encodedContent, isActive, textContent\n\n","unions":[],"aliases":[{"name":"DisplayParams","comment":" `content` can be plain text or a json string created with [encodedContent](#encodedContent).\n\n`fontSizeUnit` defaults to `\"px\"`.\n    \n`indentUnit` defaults to `(50,\"px\")`.\n","args":["msg"],"type":"{ content : String.String, fontSizeUnit : Maybe.Maybe String.String, highlighter : Maybe.Maybe (MiniRte.Types.Content -> MiniRte.Types.Content), indentUnit : Maybe.Maybe ( Basics.Float, String.String ), styling : List.List (Html.Attribute msg) }"},{"name":"EmojiBoxParams","comment":"\n","args":["msg"],"type":"{ styling : { active : List.List (Html.Attribute msg), inactive : List.List (Html.Attribute msg) }, emojis : List.List String.String }"},{"name":"FontSelectorParams","comment":"\n","args":["msg"],"type":"{ styling : List.List (Html.Attribute msg), fonts : List.List (List.List String.String) }"},{"name":"FontSizeSelectorParams","comment":"\n","args":["msg"],"type":"{ styling : List.List (Html.Attribute msg), sizes : List.List Basics.Float }"},{"name":"InputBoxParams","comment":"\n","args":["msg"],"type":"{ styling : { active : List.List (Html.Attribute msg), inactive : List.List (Html.Attribute msg) } }"},{"name":"Parameters","comment":" `id` must be unique; it is used to monitor the position of characters.\n\n`content` is the initial content of the textarea. It can be `Just` some plain text or a json string generated by [encodedContent](#encodedContent).\n\n`fontSizeUnit` defaults to `\"px\"`.\n\n`highlighter` runs before each view update and it re-styles the text. See the [example](https://github.com/dkodaj/rte/tree/master/example).\n\n`indentUnit` defaults to `(50,\"px\")`.\n\n`selectionStyle` controls the appearance of selected text. It defaults to `[(\"background\", \"hsl(217,71%,53%)\"), (\"color\", \"white\")]`.\n\n`styling.active` styles the textarea in active mode (when editing). Use `update (Active True/False)` to switch between modes.\n\n`tagger` turns the package's own [Msg](#Msg) type into your app's msg.\n","args":["msg"],"type":"{ id : String.String, content : Maybe.Maybe String.String, fontSizeUnit : Maybe.Maybe String.String, highlighter : Maybe.Maybe (MiniRte.Types.Content -> MiniRte.Types.Content), indentUnit : Maybe.Maybe ( Basics.Float, String.String ), selectionStyle : List.List ( String.String, String.String ), styling : { active : List.List (Html.Attribute msg), inactive : List.List (Html.Attribute msg) }, tagger : MiniRte.Msg -> msg }"},{"name":"Rte","comment":" ","args":["msg"],"type":"{ emojiBox : Basics.Bool, inputBox : Maybe.Maybe MiniRte.Types.InputBox, styling : { active : List.List (Html.Attribute msg), inactive : List.List (Html.Attribute msg) }, tagger : MiniRte.Msg -> msg, textarea : MiniRte.Core.Editor }"},{"name":"SwitchParams","comment":"\n","args":[],"type":"{ activeColor : String.String, inactiveColor : String.String, width : Basics.Float }"}],"values":[{"name":"display","comment":" Display formatted text, without an editor.\n\nIf you want to preserve the option of editing it, create an editor with [init](#init) and put it in passive mode with `update (Active False)`.\n","type":"(MiniRte.Msg -> msg) -> MiniRte.DisplayParams msg -> Html.Html msg"},{"name":"emojiBox","comment":" Make it appear/disappear with `update ToggleEmojiBox`.\nEach `x` in `params.emojis` turns into a clickable div that triggers `update AddText` events.\n","type":"MiniRte.Rte msg -> MiniRte.EmojiBoxParams msg -> Html.Html msg"},{"name":"encodedContent","comment":" Serialize the content of the textarea, including formatting, links, and images.\nYou can write the result into a database and use it later with [init](#init) or [display](#display).\n","type":"MiniRte.Rte msg -> String.String"},{"name":"fontSelector","comment":" A `Html.select` element that triggers `update Font` events.\n","type":"MiniRte.Rte msg -> MiniRte.FontSelectorParams msg -> Html.Html msg"},{"name":"fontSizeSelector","comment":" A `Html.select` element that triggers `update FontSize` events.\n","type":"MiniRte.Rte msg -> MiniRte.FontSizeSelectorParams msg -> Html.Html msg"},{"name":"init","comment":"\n","type":"MiniRte.Parameters msg -> ( MiniRte.Rte msg, Platform.Cmd.Cmd msg )"},{"name":"inputBox","comment":" Input box for adding hyperlinks and image links.\nMake it appear/disappear with `update ToggleImageBox` or `update ToggleLinkBox`.\nIt contains an OK button that triggers `update ImageAdd` or `update LinkAdd`.\n","type":"MiniRte.Rte msg -> MiniRte.InputBoxParams msg -> Html.Html msg"},{"name":"isActive","comment":" Checks if the editor is active.\n","type":"MiniRte.Rte msg -> Basics.Bool"},{"name":"onOffSwitch","comment":" A switch that turns editing on/off. The `params.width` field controls its width in px.\n","type":"MiniRte.Rte msg -> MiniRte.SwitchParams -> Html.Html msg"},{"name":"subscriptions","comment":"\n","type":"MiniRte.Rte msg -> Platform.Sub.Sub msg"},{"name":"textContent","comment":" The plain text content of the textarea.\n","type":"MiniRte.Rte msg -> String.String"},{"name":"textarea","comment":" Displays the edited text plus the cursor. This object *must not* be the child of a `position: relative` node. It screws up cursor placement.    \n","type":"MiniRte.Rte msg -> Html.Html msg"},{"name":"update","comment":"\n","type":"MiniRte.Msg -> MiniRte.Rte msg -> ( MiniRte.Rte msg, Platform.Cmd.Cmd msg )"}],"binops":[]},{"name":"MiniRte.Types","comment":"\n@docs Msg, InputBox\n\n# Writing highlighters\nWhen writing a highlighter, pass in a `Content -> Content` function on init.\nThe function should modify the `highlightClasses` or `highlightStyling` fields of the elements.\nEach string `x` in `highlightClasses` turns into `Html.Attribute.class x`.\nEach `(x,y)` in `highlightStyling` turns into `Html.Attribute.style x y`.\nAttributes of `LineBreak`s apply to the preceding paragraph as a whole.\n\n@docs Content, Element, Character, EmbeddedHtml, LineBreak, Child, FontStyle, StyleTags, TextAlignType\n","unions":[{"name":"Child","comment":"","args":[],"cases":[["Child",["MiniRte.Types.EmbeddedHtml"]]]},{"name":"Element","comment":"","args":[],"cases":[["Break",["MiniRte.Types.LineBreak"]],["Char",["MiniRte.Types.Character"]],["Embedded",["MiniRte.Types.EmbeddedHtml"]]]},{"name":"InputBox","comment":"\n","args":[],"cases":[["ImageInputBox",["String.String"]],["LinkInputBox",["String.String"]]]},{"name":"Msg","comment":"    \nFor toolbar icons or shortcut keys. See the [example](https://github.com/dkodaj/rte/tree/master/example) for tips.        \n      Active Bool       -- turn editing on/off\n    | AddText String    -- insert text\n    | Bold              -- make text bold\n    | Class String      -- put a class on current paragraph \n    | Core MiniRte.Core.Msg\n                        -- normally, you won't need this\n    | Cut\n    | Copy\n    | Font (List String)\n                        -- set current font families\n                        -- e.g. [\"Oswald\", \"sans-serif\"]\n    | FontSize Float    -- set current font size\n    | FromBrowserClipboard String\n                        -- see package description\n    | Heading           -- toggles between h1 and plain div\n    | ImageAdd String   -- embed image (the String is a link)\n    | ImageInput String -- modify content of image input box\n    | Indent            -- increase indent of current para\n    | Italic            -- make text italic\n    | LinkAdd String    -- add link to current selection\n    | LinkInput String  -- modify content of link input box\n    | NoOp              -- normally, you won't need this\n    | StrikeThrough     -- cross out text\n    | TextAlign MiniRte.Types.TextAlign\n                        -- change alignment of current para\n    | ToBrowserClipboard String\n                        -- see package description\n    | ToggleEmojiBox    -- turn emoji input box on/off\n    | ToggleImageBox    -- turn image link input box on/off\n    | ToggleLinkBox     -- turn link input box on/off\n    | Underline         -- underline text\n    | Undo              -- undo last action\n    | Unindent          -- decrease indent of current para\n    | Unlink            -- remove the link the cursor is touching\n","args":[],"cases":[["Active",["Basics.Bool"]],["AddText",["String.String"]],["Bold",[]],["Class",["String.String"]],["Core",["MiniRte.CoreTypes.Msg"]],["Cut",[]],["Copy",[]],["Font",["List.List String.String"]],["FontSize",["Basics.Float"]],["FromBrowserClipboard",["String.String"]],["Heading",[]],["ImageAdd",["String.String"]],["ImageInput",["String.String"]],["Indent",[]],["Italic",[]],["LinkAdd",["String.String"]],["LinkInput",["String.String"]],["NoOp",[]],["StrikeThrough",[]],["TextAlign",["MiniRte.Types.TextAlignType"]],["ToBrowserClipboard",["String.String"]],["ToggleEmojiBox",[]],["ToggleImageBox",[]],["ToggleLinkBox",[]],["Underline",[]],["Undo",[]],["Unindent",[]],["Unlink",[]]]},{"name":"TextAlignType","comment":"","args":[],"cases":[["Center",[]],["Left",[]],["Right",[]]]}],"aliases":[{"name":"Character","comment":"","args":[],"type":"{ char : Char.Char, fontStyle : MiniRte.Types.FontStyle, highlightClasses : List.List String.String, highlightStyling : MiniRte.Types.StyleTags, id : Basics.Int, link : Maybe.Maybe String.String }"},{"name":"Content","comment":"","args":[],"type":"List.List MiniRte.Types.Element"},{"name":"EmbeddedHtml","comment":"","args":[],"type":"{ attributes : List.List ( String.String, String.String ), classes : List.List String.String, children : List.List MiniRte.Types.Child, highlightClasses : List.List String.String, highlightStyling : MiniRte.Types.StyleTags, id : Basics.Int, nodeType : Maybe.Maybe String.String, styling : MiniRte.Types.StyleTags, text : Maybe.Maybe String.String }"},{"name":"FontStyle","comment":"","args":[],"type":"{ classes : List.List String.String, fontFamily : List.List String.String, fontSize : Maybe.Maybe Basics.Float, styling : MiniRte.Types.StyleTags }"},{"name":"LineBreak","comment":"","args":[],"type":"{ classes : List.List String.String, highlightClasses : List.List String.String, highlightIndent : Basics.Int, highlightStyling : MiniRte.Types.StyleTags, id : Basics.Int, indent : Basics.Int, nodeType : Maybe.Maybe String.String, styling : MiniRte.Types.StyleTags }"},{"name":"StyleTags","comment":"","args":[],"type":"List.List ( String.String, String.String )"}],"values":[],"binops":[]}]