238 ·GitHub
What is this?
Twinkleplop is a small, fast syntax highlighter and code authoring toolkit for the web: you install just the languages you need, generate HTML or tokens from your code, and style the output with CSS.
Is it a library I call from my own code, or an app I run?
It is a library, not an app: a TypeScript package published on npm that you call from your own project — there is no interface or service to run.
How do I add it to a project?
Install it from npm ('npm install twinkleplop'), then install the languages you need and call it to generate HTML or tokens for your snippets.
Do I have to bundle support for every language, or just the ones I use?
Just the ones you use — languages are opt-in, so you install only the grammars your project actually needs rather than one big bundle with everything.
Is it free to use, even commercially?
Yes — twinkleplop is MIT-licensed, so it can be used free of charge in personal and commercial projects.
What are similar projects?
microlighter, editor.md, highlight.js, prism, emotion, wangEditor, tui.editor, bootstrap-table
Which topics is it in?
syntax-highlighter, styling, tokenization, parsing, toolkit, syntax-highlighting, lightweight, editor, javascript-library, css, html, web-development