1.0.1 • Published 8 years ago

make-editable v1.0.1

Weekly downloads
12
License
BSD
Repository
github
Last release
8 years ago

make-editable

Make given element editable by user

Install

$ npm install make-editable

Usage

var makeEditable = require('make-editable')

var editable = makeEditable(document)

editable.selectAll()
editable.bold()
editable.link('http://foobar.com')
editable.img('http://foo.com/bar.jpg')
editable.exec(command, value, showDefaultUI)

Command Reference

  • exec: exec(commandName, value, showUI)

Formatting:

  • bold: bold
  • italic: italic
  • underline: underline
  • color: foreColor
  • bgcolor: backColor
  • fontName: fontName
  • fontSize: fontSize
  • plain: removeFormat
  • center: justifyCenter
  • justify: justifyFull
  • left: justifyLeft
  • right: justifyRight
  • indent: indent
  • outdent: outdent

Elements:

  • img: insertImage
  • link: link
  • unlink: unlink
  • orderedList: insertOrderedList
  • unorderedList: insertUnorderedList

Other:

  • selectAll: selectAll
  • undo: undo
  • redo: redo
  • copy: copy
  • paste: paste
  • delete: delete
1.0.1

8 years ago

1.0.0

8 years ago

0.0.1-security

8 years ago

2.0.0

8 years ago

0.0.0

9 years ago