jxxcarlson/elm-text-editor/7.0.0

NOTE: the latest version is 7.0.8

Editor.Update

Blah, blah ...

type Msg
= NoOp
| MouseDown Position
| MouseOver Position
| MouseUp
| Copy
| CopyPasteClipboard
| WriteToSystemClipBoard
| Cut
| CursorLeft
| CursorRight
| CursorUp
| CursorDown
| CursorToLineEnd
| CursorToLineStart
| CursorToGroupEnd
| CursorToGroupStart
| Insert String
| FirstLine
| AcceptLineNumber String
| AcceptSearchText String
| AcceptReplacementText String
| ReplaceCurrentSelection
| LastLine
| Paste
| PasteFromClipboard
| RemoveCharAfter
| RemoveCharBefore
| RemoveGroupAfter
| RemoveGroupBefore
| Indent
| Deindent
| SelectUp
| SelectDown
| SelectLeft
| SelectRight
| SelectToLineStart
| SelectToLineEnd
| SelectToGroupStart
| SelectToGroupEnd
| SelectAll
| SelectGroup
| SelectLine
| SendLine
| Undo
| Redo
| ScrollUp Int
| ScrollDown Int
| ScrollToSelection ( Position, Position )
| RollSearchSelectionForward
| RollSearchSelectionBackward
| SyncToSearchHit
| Clear
| WrapSelection
| WrapAll
| ToggleWrapping
| ToggleHelp
| ToggleInfoPanel
| ToggleGoToLinePanel
| ToggleSearchPanel
| ToggleReplacePanel
| OpenReplaceField
| DebounceMsg Msg
| Unload String
| GotViewport (Result Error Viewport)
| GotViewportForSync
Position
(Maybe Position)
(Result Error Viewport)

The messages to which the editor responds

blur : String -> Cmd Msg

A command to lose focus on the element with the given id.

clearState : InternalState -> InternalState

Return the "zero"" internal state

focus : String -> Cmd Msg

A command to place the focus on the element with the given id.

scrollToLine : Int -> InternalState -> Buffer -> ( InternalState, Buffer )

Return a pair (InternalState, Buffer) representing the editor scrolled to a given line k.

scrollToText : String -> InternalState -> Buffer -> ( InternalState, Buffer )

Return data representing the editor scrolled toa given string (first search occurrence).

update : Buffer -> Msg -> InternalState -> ( InternalState, Buffer, Cmd Msg )

Return data representing an editor updated via a message and a new buffer