0.0.3 • Published 7 years ago

jsedit v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

jsEdit

jsEdit is a wysiwyg-editor entirely written in JavaScript.

It currently only supports plain-text and basic HTML-support (plus adding of images, but no resizing).

RTF and Markdown-support are planned as long time targets.

Supported browsers

The best supported browser is chrome/chromium, but Firefox and Edge are also supported.

Every browser that supports HTML5, CSS3 and some ES6 should be fine too.

IE is currently not supported.

Usage

import JsEdit from 'jsedit';

editor = new JsEdit(document.body);

You could also specify a config-object:

editor = new JsEdit(document.body, {
    onSave: (content, mime) => {
        console.log('save ', content, ' as ', mime);
    },
    
    menu: {
        disable: ['newFile', 'loadFile']
    }
});

This config-object would mark the newFile and loadFile as disabled (you could style them like you want, they get the CSS-class 'menu__entry--disabled') and listen to the onSave-event.

Currently you could disable the following MenuEntries:

  • File-Menu: newFile, loadFile, saveFile
  • Format-Menu: bold, italic, underline, strikethrough, subscript, superscript, textcolor, fontFamily, fontSize; unorderedList, orderedList, indent, outdent, alignLeft, alignRight, alignCenter, alignJustify

You could listen to the following events:

  • onSave: Is called when a save-action is triggered (by MenuEntry or hotkey)
  • onLoad: Is called when a load-action is triggered (by MenuEntry)

Roadmap

The current milestones could be found here. I manage this project in my free time. Because of this I will not upload a roadmap.

I will work on this project when i want to work on it, but feel free to send a merge-request.

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago