Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pell

> 开发工具
Open source

the simplest and smallest WYSIWYG text editor for web, with no dependencies

12.0K stars0 likes3 views
WebsiteGitHub

About

the simplest and smallest WYSIWYG text editor for web, with no dependencies

v2 working branch and v2 project board


pell is the simplest and smallest WYSIWYG text editor for web, with no dependencies

Comparisons

library size (min+gzip) size (min) jquery bootstrap react link
pell 1.38kB 3.54kB https://github.com/jaredreich/pell
squire 16kB 49kB https://github.com/neilj/Squire
medium-editor 27kB 105kB https://github.com/yabwe/medium-editor
quill 43kB 205kB https://github.com/quilljs/quill
trix 47kB 204kB https://github.com/basecamp/trix
ckeditor 163kB 551kB https://ckeditor.com
trumbowyg 8kB 23kB x https://github.com/Alex-D/Trumbowyg
summernote 26kB 93kB x x https://github.com/summernote/summernote
draft 46kB 147kB x https://github.com/facebook/draft-js
froala 52kB 186kB x https://github.com/froala/wysiwyg-editor
tinymce 157kB 491kB x https://github.com/tinymce/tinymce

Features

  • Pure JavaScript, no dependencies, written in ES6
  • Easily customizable with the sass file (pell.scss) or overwrite the CSS

Included actions:

  • Bold
  • Italic
  • Underline
  • Strike-through
  • Heading 1
  • Heading 2
  • Paragraph
  • Quote
  • Ordered List
  • Unordered List
  • Code
  • Horizontal Rule
  • Link
  • Image

Other available actions (listed at https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand):

  • Justify Center
  • Justify Full
  • Justify Left
  • Justify Right
  • Subscript
  • Superscript
  • Font Name
  • Font Size
  • Indent
  • Outdent
  • Clear Formatting
  • Undo
  • Redo

Or create any custom action!

Browser Support

  • IE 9+ (theoretically, but good luck)
  • Chrome 5+
  • Firefox 4+
  • Safari 5+
  • Opera 11.6+

Installation

npm:

bash
npm install --save pell

HTML:

xml
<head>
  ...
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/pell/dist/pell.min.css">
  <style>
    /* override styles here */
    .pell-content {
      background-color: pink;
    }
  </style>
</head>
<body>
  ...
  
  <script src="https://unpkg.com/pell"></script>
</body>

Usage

API

javascript
// ES6
import pell from 'pell'
// or
import { exec, init } from 'pell'
javascript
// Browser
pell
// or
window.pell
…

List of overwriteable action names

  • bold
  • italic
  • underline
  • strikethrough
  • heading1
  • heading2
  • paragraph
  • quote
  • olist
  • ulist
  • code
  • line
  • link
  • image

Examples

General

xml

</div>
…

Example (Markdown)

xml

</div>
javascript
import { init } from 'pell'
import Turndown from 'turndown'

const { turndown } = new Turndown({ headingStyle: 'atx' })

init({
  element: document.getElementById('editor'),
  actions: ['bold', 'italic', 'heading1', 'heading2', 'olist', 'ulist'],
  onChange: html => {
    document.getElementById('markdown-output').innerHTML = turndown(html)
  }
})

Frameworks

  • React
  • Vue

Custom Styles

SCSS

scss
$pell-content-height: 400px;
// See all overwriteable variables in src/pell.scss

// Then import pell.scss into styles:
@import '../../node_modules/pell/src/pell';

CSS

css
/* After pell styles are applied to DOM: */
.pell-content {
  height: 400px;
}

License

MIT

Credits

BrowserStack for cross browser testing:

Issues· 66 open

View all issuesOpen on GitHub
  • #222

    Is this project abandoned?

    Updated Sep 26, 2026
  • #220

    DOC: Vue3.2 composition example + suggestion

    Updated Sep 7, 2022
  • #221

    Suggestion: different states for the buttons

    Updated Sep 7, 2022
  • #112

    Destroy method

    featureUpdated Jul 27, 2022
  • #219

    BUG: Third party input method initial letter malposition

    Updated Jul 14, 2022
  • #218

    Insert HTML code into editor?

    Updated Feb 5, 2022
  • #207

    a isssue when input Chinese language

    Updated Dec 22, 2021
  • #203

    Hi ! There's way to get div id on onChange event ?

    Updated Jul 7, 2021
  • #210

    Can't delete custom elements

    Updated Jul 7, 2021
  • #213

    Suggestion: allow the custom action icon to be a function

    Updated Apr 12, 2021

> Tags

JavaScriptcontenteditableeditorjavascriptrich-text-editor

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具