HTMLElement: contentEditable プロパティ
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.
* Some parts of this feature may have varying levels of support.
contentEditable
は HTMLElement
インターフェイスのプロパティで、要素が編集可能かどうかを指定します。
これは列挙属性で、次の値を設定できます。
- '
true
' は、要素の内容が編集可能 (contenteditable
) であることを示します。 - '
false
' は、要素が編集できないことを示します。 - '
plaintext-only
' は要素の生のテキストは編集可能ですが、リッチテキストの書式は編集できないことを示します。
HTMLElement.isContentEditable
プロパティを使用すると、このプロパティの計算済みの論理値をテストできます。
属性がない、またはその値が不正な場合、その値は親要素から継承されます。したがって、要素は親要素に基づいて編集可能(または不可能)になります。
値
文字列。
仕様書
Specification |
---|
HTML # contenteditable |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
contentEditable | ||||||||||||
plaintext-only as a value |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- In development. Supported in a pre-release version.
- In development. Supported in a pre-release version.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.