Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsedit

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsedit

An editor completely written in JavaScript.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 30 Apr 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc