make-editable
Make given document element editable by user
Last updated 4 years ago by tehshrike .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install make-editable 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

5 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.0                                ...           6 years ago
  • 0.0.1-security                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |