All Projects → pablohirafuji → Elm Syntax Highlight

pablohirafuji / Elm Syntax Highlight

Licence: apache-2.0
Syntax highlighting in Elm

Programming Languages

elm
856 projects

Projects that are alternatives of or similar to Elm Syntax Highlight

colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-77.05%)
Mutual labels:  syntax, highlight
Nord Highlightjs
An arctic, north-bluish clean and elegant highlight.js theme.
Stars: ✭ 49 (-19.67%)
Mutual labels:  highlight, syntax
Vue Highlight.js
📜 Highlight.js syntax highlighter component for Vue.
Stars: ✭ 180 (+195.08%)
Mutual labels:  highlight, syntax
CodeEditorView
Code Editor UITextView
Stars: ✭ 20 (-67.21%)
Mutual labels:  syntax, highlight
see-cli
A colorful 🌈 cat - syntax highlight print CLI
Stars: ✭ 24 (-60.66%)
Mutual labels:  syntax, highlight
Refractor
Lightweight, robust, elegant virtual syntax highlighting using Prism
Stars: ✭ 291 (+377.05%)
Mutual labels:  highlight, syntax
remark-highlight.js
Legacy plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead
Stars: ✭ 58 (-4.92%)
Mutual labels:  syntax, highlight
Lowlight
Virtual syntax highlighting for virtual DOMs and non-HTML things
Stars: ✭ 310 (+408.2%)
Mutual labels:  highlight, syntax
Codeflask
A micro code-editor for awesome web pages.
Stars: ✭ 836 (+1270.49%)
Mutual labels:  highlight
Ember Highlight
Highlight a given term(s) inside the `{{highlight-terms}}` component block.
Stars: ✭ 10 (-83.61%)
Mutual labels:  highlight
Nord Visual Studio Code
An arctic, north-bluish clean and elegant Visual Studio Code theme.
Stars: ✭ 749 (+1127.87%)
Mutual labels:  syntax
Modiscript
Acche din aa gaye
Stars: ✭ 888 (+1355.74%)
Mutual labels:  syntax
Comby
A tool for structural code search and replace that supports ~every language.
Stars: ✭ 912 (+1395.08%)
Mutual labels:  syntax
Natasha
Solves basic Russian NLP tasks, API for lower level Natasha projects
Stars: ✭ 788 (+1191.8%)
Mutual labels:  syntax
Catage
Node package and CLI tool to convert code into an image with syntax highlighting
Stars: ✭ 44 (-27.87%)
Mutual labels:  syntax
Rxmarkdown
📠Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
Stars: ✭ 714 (+1070.49%)
Mutual labels:  highlight
Highlight Userguideview
用户指引提示view,新特性高亮指示 HighLight
Stars: ✭ 647 (+960.66%)
Mutual labels:  highlight
Remark Boilerplate
A boilerplate to create presentations using remark, Gulp, Stylus and more.
Stars: ✭ 41 (-32.79%)
Mutual labels:  highlight
Kindleclippings
Extract kindle highlights into organised text files
Stars: ✭ 24 (-60.66%)
Mutual labels:  highlight
Gitdiff
Highlights deltas against git repo in Xcode
Stars: ✭ 906 (+1385.25%)
Mutual labels:  highlight

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!).

Themes

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
            |> Result.map (toBlockHtml (Just 1))
            |> Result.withDefault
                (pre [] [ code [] [ text model.elmCode ]])
        ]

Thanks

Thank you Evan for bringing joy to the frontend.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].