# panagram

> Panagram.js is an extra small (2kb) rich text editor build in pure JavaScript, with no dependencies.

Latest version **1.0.5** (published 2018-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install panagram
pnpm add panagram
yarn add panagram
bun add panagram
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-04-08 |
| First published | 2018-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gordan Prastalo |
| Maintainers | stoick001 |
| Keywords | text editor, editor, rich text, wysiwyg, contenteditable |

## Links

- npm: https://www.npmjs.com/package/panagram
- npm.io page: https://npm.io/package/panagram

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.5 (latest) — 2018-04-08
- 1.0.4 — 2018-04-07
- 1.0.3 — 2018-04-07
- 1.0.2 — 2018-04-07
- 1.0.1 — 2018-04-07
- 1.0.0 — 2018-04-07

## README

# Panagram.js

Panagram.js is an extra small (2kb) rich text editor build in pure JavaScript, with no dependencies.

Live Demo: https://panagram.herokuapp.com/

## Setup

Enabling Panagram.js is very easy, you just need to follow these two simple steps:

#### include it from a dist/ folder
  ```
    <script src="dist/Panagram.min.js"></script>
  ```

  or

  ```
  nmp install --save panagram
  ```

#### initialize Panagram.js with init()
  ```
  Panagram.init({
     // one of the pre built controls, required
    controls: 'defaultControls',

    // <HTMLElement> in which you want to put controls, required
    ctrElement: document.getElementById('controls'),

    // <HTMLElement> for rich text output, required
    outElement: document.getElementById('output'),
  });
  ```

## Custom controls

You can add your custom controls in config.js file. You can add to an existing set or create your own. If you do create your own share it so that other people can use it.

Quick rundown or different properties:
  1.  icon - this is how you choose to represent your control
  2.  title - is an as it name says a title
  3.  state - is used if a command is in a list of possible commands and does not need any additional data
  4.  formatBlock - is used if a command is not in a list of possible commands
  5.  extra - is used if a command is in a list of possible commands and does need additional data. Extra MUST return that additional data
  6.  short - used for toggling active class on element with keyboard shortcuts

---
_Source: https://npm.io/package/panagram · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
