An open API service indexing awesome lists of open source software.

https://github.com/joepdooper/mini-editor

A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.
https://github.com/joepdooper/mini-editor

Last synced: 4 months ago
JSON representation

A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.

Awesome Lists containing this project

README

          

# MiniEditor

A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.

### Install:

```bash
npm install @joepdooper/mini-editor
```

### Features:

- Inline content editing with a floating formatting toolbar
- Supports bold, italic, underline, headings, blockquotes, and links
- Automatically positions toolbar based on text selection
- Handles plain text pasting to prevent unwanted formatting
- Syncs editable content with hidden inputs for form submission

```html


Bold
Italic
Underline
Link

```

```javascript
document.addEventListener('DOMContentLoaded', () => {
MiniEditor.initAll('.editor-block', '#toolbar');
});
```