Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLElement
  4. isContentEditable

HTMLElement: isContentEditable property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

TheHTMLElement.isContentEditable read-only propertyreturns a boolean value that istrue if the contents of the elementare editable; otherwise it returnsfalse.

Value

A boolean value.

Examples

HTML

html
<p>Uneditable Paragraph</p><p contenteditable="true">Editable Paragraph</p><p>Is the first paragraph editable?</p><p>Is the second paragraph editable?</p>

JavaScript

js
const firstParagraph = document.getElementById("firstParagraph");const secondParagraph = document.getElementById("secondParagraph");const infoText1 = document.getElementById("infoText1");const infoText2 = document.getElementById("infoText2");infoText1.textContent += ` ${firstParagraph.isContentEditable}`;infoText2.textContent += ` ${secondParagraph.isContentEditable}`;

Result

Specifications

Specification
HTML
# dom-iscontenteditable-dev

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp