[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/API/Document/execCommand [Back]  [Original]

Document.execCommand() - Web API | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Document.execCommand()

Deprecated

Avoid using this feature in new projects. The execCommand() method is "not implemented consistently or fully by user agents, and it is not expected that this will change in the foreseeable future." This feature may be a candidate for removal from web standards or browsers.

Consider using the following features instead: Async clipboard contenteditable.

HTML designMode execCommand . (, ) ( ) () . contentEditable execCommand() .

In this article

js
bool = document.execCommand(aCommandName, aShowDefaultUI, aValueArgument);

false Boolean .

aCommandName

DOMString . Commands .

aShowDefaultUI

UI Boolean . Mozilla .

aValueArgument

(insertImage URL ) DOMString . null .

backColor

. styleWithCss . <color> . Internet Explorer .

bold

/. Internet Explorer <b> <strong> .

contentReadOnly

. boolean true/false . (Internet Explorer .)

copy

. . .

. HREF URI . URI . (Internet Explorer null URI .)

cut

. . .

decreaseFontSize

<small> . (Internet Explorer .)

delete

.

enableInlineTableEditing

. (Internet Explorer .)

enableObjectResizing

.

fontName

. ( "Arial") .

fontSize

. HTML (1-7) .

foreColor

. .

formatBlock

HTML (Firefox BLOCKQUOTE ). . ( "H1", "P", "DL", "BLOCKQUOTE"). (Internet Explorer H1 - H6 ADDRESS, PRE < > "<H1>" .)

forwardDelete

. delete .

heading

. ( "H1", "H6") . (Internet Explorer Safari .)

hiliteColor

. . UseCSS . (Internet Explorer .)

increaseFontSize

BIG . (Internet Explorer .)

indent

. Firefox .

insertBrOnReturn

br . (Internet Explorer .)

insertHorizontalRule

( ).

insertHTML

HTML ( ). HTML . (Internet Explorer .)

insertImage

( ). SRC URI . URI . (Internet Explorer null URI .)

insertOrderedList

.

insertUnorderedList

.

insertParagraph

. (Internet Explorer .)

insertText

( ).

italic

/. (Internet Explorer I EM .)

justifyCenter

.

justifyFull

.

justifyLeft

.

justifyRight

.

outdent

.

paste

( ). user.js . [1].

redo

.

removeFormat

.

selectAll

.

strikeThrough

/ .

subscript

/ .

superscript

/ .

underline

/ .

undo

.

.

useCSS

HTML CSS . boolean true/false . : (CSS false HTML true). (Internet Explorer .) . styleWithCSS .

styleWithCSS

useCSS . . style true, false .

CodePen how to use .

This feature does not appear to be defined in any specification.


Web Proxy Viewer  |  New URL  |  Original Page