Web.Util.TextCursor.Element   
- Package
 - purescript-textcursor
 - Repository
 - MonoidMusician/purescript-textcursor
 
#textCursor Source
textCursor :: TextCursorElement -> Effect TextCursorGet the TextCursor from a TextCursorElement.
#setTextCursor Source
setTextCursor :: TextCursor -> TextCursorElement -> Effect UnitSet the TextCursor on a TextCursorElement. Calls setValue,
setSelectionStart, setSelectionEnd, and setSelectionDirection to
ensure a consistent state for the field.
#modifyTextCursor Source
modifyTextCursor :: (TextCursor -> TextCursor) -> TextCursorElement -> Effect UnitModifies the TextCursor on an element through the given endomorphism.
#modifyTextCursorST Source
modifyTextCursorST :: forall s m. MonadState s m => MonadEffect m => Lens' s TextCursor -> (TextCursor -> TextCursor) -> TextCursorElement -> m sModifies the TextCursor on an element as well as setting the result in a
State+Eff monad via a lens. Useful for components processing input events!
#focusTextCursor Source
focusTextCursor :: TextCursor -> TextCursorElement -> Effect UnitFocuses an element after setting the TextCursor.
#focusTextCursorById Source
focusTextCursorById :: String -> TextCursor -> Effect UnitLooks up an element by id to focus with a TextCursor.
Re-exports from Web.Util.TextCursor.Element.HTML    
#setSelectionStart Source
setSelectionStart :: Setter IntSet the index of the start of the selection.
#setSelectionEnd Source
setSelectionEnd :: Setter IntSet the index of the end of the selection.
#setSelectionDirection Source
setSelectionDirection :: Setter DirectionSet the direction of the selection
#selectionStart Source
selectionStart :: Getter IntGet the index of the start of the selection.
#selectionEnd Source
selectionEnd :: Getter IntGet the index of the end of the selection.
#selectionDirection Source
selectionDirection :: Getter DirectionGet the direction of the selection.
Re-exports from Web.Util.TextCursor.Element.Type    
#TextCursorElement Source
data TextCursorElementA container for the two usable Element types:
HTMLInputElementHTMLTextAreaElement
Note that not all HTMLInputElement nodes are valid, as they must contain
text content. See validate for specifics.
Common operations are defined in TextCursor.Element.HTML.
Constructors
#validate' Source
validate' :: Maybe TextCursorElement -> Effect (Maybe TextCursorElement)Convert from a Foreign error computation (type F) to a validated
TextCursorElement.
#validate Source
validate :: TextCursorElement -> Effect (Maybe TextCursorElement)Validate a TextCursorElement. Input fields need to have one of the
following types when this is called:
- text (default)
 - search
 - url
 
#toHTMLElement Source
toHTMLElement :: TextCursorElement -> HTMLElementConvert a TextCursorElement to a generic HTMLElement. Useful for
focus.
#readEventTarget Source
readEventTarget :: Event -> Maybe TextCursorElementRead a TextCursorElement from the target field of an Event.
#lookupValidateAndDo Source
lookupValidateAndDo :: String -> (TextCursorElement -> Effect Unit) -> Effect UnitLook up a TextCursorElement by id and run an action if found.
#lookupAndValidate Source
lookupAndValidate :: String -> Effect (Maybe TextCursorElement)Look up a TextCursorElement in the document by id.