Module

Text.Markdown.SlamDown.Halogen.Component

Package
purescript-markdown-halogen
Repository
slamdata/purescript-markdown-halogen

This module defines a component for rendering SlamDown documents to HTML

#defaultBrowserFeatures Source

defaultBrowserFeatures :: BrowserFeatures

By default, no features are enabled.

#evalSlamDownQuery Source

#SlamDownConfig Source

type SlamDownConfig = { browserFeatures :: BrowserFeatures, formName :: String }

#renderSlamDown Source

renderSlamDown :: forall v. Value v => SlamDownConfig -> SlamDownState v -> ComponentHTML (SlamDownQuery v)

Render a SlamDown document into an HTML form.

#slamDownComponent Source

slamDownComponent :: forall v m. Value v => SlamDownConfig -> Component HTML (SlamDownQuery v) Unit (SlamDownMessage v) m

Bundles up the SlamDown renderer and state machine into a Halogen component.

Re-exports from Text.Markdown.SlamDown.Halogen.Component.Query

Re-exports from Text.Markdown.SlamDown.Halogen.Component.State

#SlamDownStateR Source

type SlamDownStateR a = { document :: SlamDownP a, formState :: SlamDownFormState a }

#SlamDownState Source

newtype SlamDownState a

The state of a SlamDown form

Constructors

Instances

#SlamDownFormState Source

#SlamDownFormDesc Source

#syncState Source

#replaceDocument Source

#getFormFieldValue Source

getFormFieldValue :: forall v. String -> SlamDownState v -> Maybe (FormFieldValue v)

Gets the form field value, or the default if none is present.

#formFieldGetDefaultValue Source

#emptySlamDownState Source

emptySlamDownState :: forall v. SlamDownState v

The initial empty state of the form, with an empty document.