Socket
Socket
Sign inDemoInstall

javascript-editor

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript-editor

codemirror + esprima powered html5 javascript editor component


Version published
Maintainers
1
Created
Source

javascript-editor

codemirror + esprima powered html5 javascript editor component

based originally on htmleditor by mrdoob

features

  • JS syntax highlighting
  • JS errors are detected and highlighted as you code
  • by default if you drop a .js file on the editor it will load the contents
  • modular and installable with NPM

usage

use it with browserify

npm install javascript-editor
var editor = require('javascript-editor')

editor({ container: document.querySelector('#editor') })

editor.on('change', function() {
  var value = editor.getValue()
})

default options

var defaults = {
	value: "// hello world\n",
	container: document.body,
	mode: "javascript",
	lineNumbers: true,
	matchBrackets: true,
	indentWithTabs: false,
	tabSize: 2,
	indentUnit: 2,
	updateInterval: 500,
	dragAndDrop: true
}

license

BSD

FAQs

Package last updated on 04 Feb 2013

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