Use ScriptaV2.APISimple.compile to transform source text to elm-ui HTML for the given markup language.
You will need the following imports in your Elm file:
import ScriptaV2.APISimple
import ScriptaV2.Msg exposing (MarkupMsg)
import ScriptaV2.Language exposing (Language)
import Element exposing (Element)Your Msg type definition should read:
type Msg
= ...
| Render MarkupMsgThe choice of language is made from
type Language
= MicroLaTeXLang
| EnclosureLang
| SMarkdownLangin ScriptaV2.Language
Compile source text to elm-ui HTML. The width of the rendered text in pixels is defined by docWidth. The editCount should be 0 for a static document. For documents in a live editing context, the editCount should be increment after each edit. This ensures that the rendered text is properly updated.