This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
We were not able to find the expected elm-package.json file at this tag.
Tag 3.4.0
Committed At 2020-08-25 22:40:05 UTC



    Elm Syntax Highlight

    Syntax highlighting in Elm. Demo.

    Language support

    And there is a noLang generic option for when the language is unknown (Thanks @Anton-4!).


    You can define the theme either by copying and pasting the theme styles into your .css file or using the useTheme helper.

    Copying and pasting the theme

    All themes and required styles can be found here.

    Using useTheme helper

    Place the useTheme function with your chosen theme anywhere on your view.

    import SyntaxHighlight exposing (useTheme, monokai, elm, toBlockHtml)
    view : Model -> Html msg
    view model =
        div []
            [ useTheme monokai
            , elm model.elmCode
                |> (toBlockHtml (Just 1))
                |> Result.withDefault
                    (pre [] [ code [] [ text model.elmCode ]])


    Thank you Evan for bringing joy to the frontend.