Module

Ace.Halogen.Component

Package
purescript-ace-halogen
Repository
slamdata/purescript-ace-halogen

#aceComponent Source

aceComponent :: forall m eff. MonadAff (AceEffects eff) m => (Editor -> m Unit) -> Maybe Autocomplete -> Component HTML AceQuery Unit AceMessage m

The Ace component.

#AceQuery Source

data AceQuery a

Ace query algebra

  • SetElement - used to capture a reference to the component's element
  • Init - used internally to handle initialization of component
  • Quit - used internally to handle finalizing of component.
  • GetText - gets the current text value
  • SetText - alters the current text value
  • SetAutocomplete - sets autocomplete resume:
    • Nothing - turns it off
    • Just Basic - enables basic autocompletions (triggered by Alt + Space or Ctrl + Space)
    • Just Live - enables live autocomplete
  • SetCompleteFn - sets function providing autocomplete variants.
  • GetEditor - returns ace editor instance handled by this component.

Constructors

#AceMessage Source

data AceMessage

Ace output messages

  • AceValueChanged - raised when the value in the editor is changed.

Constructors

#AceEffects Source

type AceEffects eff = (ace :: ACE, avar :: AVAR, dom :: DOM, now :: NOW, random :: RANDOM, ref :: REF | eff)

#Autocomplete Source

data Autocomplete

Constructors

#CompleteFn Source

type CompleteFn eff = Editor -> EditSession -> Position -> String -> Aff (AceEffects eff) (Array Completion)

The type for autocomplete function s. Takes editor, session, text position, prefix, and returns array of possible completions in the Aff monad.