execCommand and contenteditable

suggest change

Syntax

Parameters

commandId value
⋮ Inline formatting commands
backColor Color value String
bold
createLink URL String
fontName Font family name
fontSize “1”, “2”, “3”, “4”, “5”, “6”, “7”
foreColor Color value String
strikeThrough
superscript
unlink
⋮ Block formatting commands
delete
formatBlock “address”, “dd”, “div”, “dt”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “p”, “pre”
forwardDelete
insertHorizontalRule
insertHTML HTML String
insertImage URL String
insertLineBreak
insertOrderedList
insertParagraph
insertText Text string
insertUnorderedList
justifyCenter
justifyFull
justifyLeft
justifyRight
outdent
⋮ Clipboard commands
copy Currently Selected String
cut Currently Selected String
paste
⋮ Miscellaneous commands
defaultParagraphSeparator
redo
selectAll
styleWithCSS
undo
useCSS

Listening to changes of contenteditable

Getting started

Formatting

Copy to clipboard from textarea using execCommandcopy

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents