From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/htmlelement/iscontenteditable/index.html | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 files/fr/web/api/htmlelement/iscontenteditable/index.html (limited to 'files/fr/web/api/htmlelement/iscontenteditable/index.html') diff --git a/files/fr/web/api/htmlelement/iscontenteditable/index.html b/files/fr/web/api/htmlelement/iscontenteditable/index.html new file mode 100644 index 0000000000..ba62e2d99d --- /dev/null +++ b/files/fr/web/api/htmlelement/iscontenteditable/index.html @@ -0,0 +1,127 @@ +--- +title: HTMLElement.isContentEditable +slug: Web/API/HTMLElement/isContentEditable +tags: + - HTML DOM + - Propriété + - Reference + - lecture seule + - Édition + - Élément HTML +translation_of: Web/API/HTMLElement/isContentEditable +--- +
+
{{ APIRef("HTML DOM") }}
+
+ +

La propriété en lecture seule HTMLElement.isContentEditable renvoie un  {{jsxref("Boolean")}} qui est true (vrai) si le contenu de l'élément est éditable ; sinon elle renvoie false(faux).

+ +

Syntaxe

+ +
editable = element.isContentEditable
+
+ +

Exemple

+ +

JavaScript

+ +
document.getElementById("infoText1").innerHTML += document.getElementById("myText1").isContentEditable;
+document.getElementById("infoText2").innerHTML += document.getElementById("myText2").isContentEditable;
+ +

HTML

+ +
<p id="myText1">Uneditable Paragraph</p>
+<p id="myText2" contentEditable="true">Editable Paragraph</p>
+
+<p id="infoText1">Can edit the first paragraph? </p>
+<p id="infoText2">Can edit the second paragraph? </p>
+ +

Résultat

+ +

{{ EmbedLiveSample('Example') }}

+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}{{Spec2('HTML WHATWG')}}Pas de changement de la dernière image, {{SpecName('HTML5.1')}}
{{SpecName('HTML5.1', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}{{Spec2('HTML5.1')}}L'image de {{SpecName('HTML WHATWG')}}, n'est pas changée par {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}{{Spec2('HTML5 W3C')}}Image de  {{SpecName('HTML WHATWG')}},  definition initiale.
+ +

Compatibilité des navigateurs

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FonctionnalitéChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }}{{ CompatGeckoDesktop("2") }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FonctionnalitéAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ CompatGeckoMobile("2") }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf