Skip to content

npm-dom/make-editable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Make given element editable by user

Resources

Stars

Watchers

Forks

Packages

No packages published