Socket
Book a DemoInstallSign in
Socket

editor-lite

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editor-lite

The lightest WYSIWYG cross-browser editor. (IE9+)

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

editor-lite Build Status

(WIP) The lightest WYSIWYG cross-browser editor. (IE9+)

Install

$ npm install --save editor-lite

Usage

const Editor = require('editor-lite');
const bar = document.getElementById('bar');
const item = document.getElementById('item');

const editor = new Editor(item, {
  toolbar: bar,
  onFocus: function () {
    bar.classList.add('toolbar__active');
  },
  onBlur: function () {
    bar.classList.remove('toolbar__active');
  },
  onKeyup: function (e, modifiers) {
    console.log(modifiers);
    //=> {alt: false, ctrl: false, meta: false, shift: false}
  }
});

API

crickets

ToDo's

  • Link, Image, iFrame handlers
  • Add autoSave (int), save (fn), and onSave (fn)
  • Add autoSync (int), sync (fn), and onSync (fn)
  • Airbar positioning
  • Include bare minimum SASS
  • Add (pretty) demo
  • Add API documentation
  • Add headers for AMD/Common/Browser exports

Roadmap

The term extension refers to an optional, accompanying file. Features should be opt-in, which is better than opt-out (from a lightweight POV).

  • Markdown extension. (includes md ==> html preview)
  • Airbar as an extension?
  • Handle image uploads directly. (uppy or dropzone or ?)
  • iFrame extension
  • Tables extension

License

MIT © Luke Edwards

Keywords

content

FAQs

Package last updated on 05 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts