jxxcarlson / elm-editor / EditorMsg


type EMsg
    = EditorNoOp
    | ExitVimInsertMode
    | MoveUp
    | MoveDown
    | MoveLeft
    | MoveRight
    | MoveToLineStart
    | MoveToLineEnd
    | PageUp
    | PageDown
    | FirstLine
    | LastLine
    | GoToLine
    | NewLine
    | InsertChar String
    | Indent
    | Deindent
    | RemoveCharBefore
    | RemoveCharAfter
    | KillLine
    | DeleteLine
    | Cut
    | Copy
    | Paste
    | WrapAll
    | WrapSelection
    | Hover Hover
    | GoToHoveredPosition
    | StartSelecting
    | StopSelecting
    | SelectLine
    | SelectUp
    | SelectDown
    | SelectLeft
    | SelectRight
    | SelectGroup
    | Undo
    | Redo
    | AcceptLineToGoTo String
    | DebounceMsg Debounce.Msg
    | Unload String
    | Clear
    | Test
    | ContextMenuMsg (ContextMenu.Msg Context)
    | Item Basics.Int
    | ToggleAutoLineBreak
    | EditorRequestFile
    | EditorRequestedFile File
    | MarkdownLoaded String
    | EditorSaveFile
    | SendLineForLRSync
    | GotViewportForSync (Maybe String) Selection (Result Browser.Dom.Error Browser.Dom.Viewport)
    | CopyPasteClipboard
    | WriteToSystemClipBoard
    | DoSearch String
    | ToggleSearchPanel
    | ToggleReplacePanel
    | OpenReplaceField
    | RollSearchSelectionForward
    | RollSearchSelectionBackward
    | ReplaceCurrentSelection
    | AcceptLineNumber String
    | AcceptSearchText String
    | AcceptReplacementText String
    | GotViewport (Result Browser.Dom.Error Browser.Dom.Viewport)
    | ToggleDarkMode
    | ToggleHelp
    | ToggleEditMode
    | MarkdownMsg Markdown.Render.MarkdownMsg

Messages that the editor responds to


type Context
    = Object
    | Background

For the context menu


type Hover
    = NoHover
    | HoverLine Basics.Int
    | HoverChar Position

Mouuse hover states


type alias Position =
{ line : Basics.Int
, column : Basics.Int 
}

Cursor position


type Selection
    = NoSelection
    | SelectingFrom Hover
    | SelectedChar Position
    | Selection Position Position

Selected text


type WrapOption
    = DoWrap
    | DontWrap