for more information visit the package's GitHub page
Package contains the following modules:
This package is as an extension of the Elm Actor Framework Package.
Turn your markdown templates into Html or any other output enriched by your Actors.
import Framework.Template.Markdown exposing (MarkdownTemplate, blank, parse)
type Actors
= Editor
| Layout
| Counter
components : Components Actors
components =
Components.fromList
[ Component.make
{ actor = Counter
, nodeName = "counter-component"
}
, Component.make
{ actor = Counter
, nodeName = "COUNTER"
}
]
template : String
template =
"""
## A Markdown Example
Lorem **ipsum** dolor sit *amet* ...
- [x] list item
- [ ] more dummy content
---
Render an actor here!
<counter-component steps="10" value="10" ></counter-component>
And another one:
<!COUNTER 100:25 >
"""
markdownTemplate : MarkdownTemplate Actors
markdownTemplate =
parse components template
|> Result.withDefault blank
Actors make up ideal components that can be used on a template.
This module uses a shared type from the Elm Actor Framework -Templates
package.
The goal of these packages is to be able to provide different parsers and renderers.
hecrj/html-parser
)elm/html
)