This module contains a simple chat component that you can easily add to your Elm user interface.
Extra attributes for the UI components.
This is the initial value of Settings.attributes.
You'll usually create one by changing defaultAttributes.
A function to turn a Settings record and a Cmd into a Msg.
A function to turn an input string and a Settings record into a Msg.
Make a Settings record to add to your Model.
Args are id initialFontSize showSizeControls updater.
id is the Html id for the textarea showing the chat.
initialFontSize is the initial font size of the textarea in pt.
showSizeControls is True to show the font size controls to the left of the text area.
updater will be called to generate messages to update the Settings in your Model.
Create a chat component.
Add a line to the chat box.
Create a text input control.
Args are textSize buttonText sender settings.
textSize is the width in characters of the input control.
buttonText is the text for the button that sends the input.
sender is a function to turn an input string and settings into a Msg`.
settings is your Settings record.
Turn chat Settings into a JSON string.
Does not encode the attributes or updater properties.
The JSON encoder for encodeSettings.
Turn a JSON string back into a Settings record.
Updater is as to makeSettings.
Restores with default attributes, so you'll need to change those
after decoding, if you customize them.
The JSON Decoder for decodeSettings.
Restore the scroll position after restoring from a JSON string.
The default value of the Settings.attributes property.
Settings for the chat component.
Make one of these with
makeSettings, and store it in your model.