
pell
A tiny, dependency-free rich text editor you can drop into a web page.
- Stars
- 12k
- Forks
- 548
- Licence
- MIT
- Language
- JavaScript
- Last update
- 2.5 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
pell is a small JavaScript library that adds a basic WYSIWYG (what you see is what you get) text editor to a web page. You give it an element and it shows toolbar buttons for common formatting such as bold, italic, lists, headings, links and images, and it reports the resulting HTML through a callback. It has no dependencies and is intended for simple editing needs rather than full-featured document editing.
- Add a formatting toolbar to a blog post or comment form
- Build a simple note-taking textarea that saves HTML output
- Create a custom toolbar button that runs your own function
- Convert the editor's HTML to Markdown using the documented Turndown example
Great for
- Web developers who need a simple rich text box in a form or admin page
- Projects where a small file size matters more than many features
- Developers who want to customize toolbar buttons or style the editor with CSS or SCSS
- Projects that will convert the HTML output to Markdown with a converter such as Turndown
Not ideal for
- Teams needing advanced editing features like tables, collaboration or plugins, since the README lists only the basic actions and no such features
- Projects that must support old browsers, because the README says IE 9 support is theoretical
- Anyone who needs a maintained v2 release, since the README points to a v2 working branch and project board without stating its status
How to get it
- 1
Install with a package manager
You'll need: Node.js and npm, if installing from npm
Install from npm
npm install --save pell - 2
Run it
- Install the package with npm or include the script and stylesheet from unpkg in your HTML.
- Add an empty div with an id such as editor and class pell to your page.
- Call pell.init with the element and an onChange callback, as shown in the README example.
- Open the page in a browser and try the toolbar buttons.
- 3
Get the most out of it
- Pick the toolbar buttons you need with the actions array, in the order you want
- Use the classes option or the pell.scss variables to match your site's styling
- Set styleWithCSS to true if you want span-based styling instead of b or i tags
- Use pell.exec to trigger editor commands from your own code
- Pair with Turndown to produce Markdown output, as shown in the README
Downloads
Strengths
- Very small: the README reports about 1.38kB minified and gzipped
- No dependencies and written in plain JavaScript
- Customizable through the actions list, class names and SCSS variables
Trade-offs
- Feature set is basic; advanced features are not listed in the README
- The latest release shown is v1.0.6 and the last push was May 2024, so upkeep is unclear
- Relies on the browser's execCommand API, which the README links to MDN for reference
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| pell (this) | 12k | Library | beginner | 2.5 years ago | Web developers who need a simple rich text box in a form or admin page |
| trix | 20k | Library | intermediate | 9 days ago | Developers adding a rich text box to a Rails or other web app |
| milkdown | 12k | Library | advanced | 4 days ago | Developers adding a rich markdown editing box to a web app |
| tiptap | 38.9k | Library | intermediate | 4 days ago | Developers building a custom text editor into a web product |
| tui.editor | 18k | Library | intermediate | 2.3 years ago | Web developers who want an embeddable Markdown editor in their own site or app |
| vditor | 11.4k | Library | intermediate | 19 days ago | Developers who want to embed a Markdown editor in a web app |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.