diff options
author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:14 +0200 |
---|---|---|
committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
commit | c05efa8d7ae464235cf83d7c0956e42dc6974103 (patch) | |
tree | 6ea911b2f2010f63a026de6bb7a1a51e7690a7e1 /files/fr/web/api/htmlelement/iscontenteditable/index.md | |
parent | 13a5e017558b248ee1647d4a5825f183b51f09ad (diff) | |
download | translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.gz translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.bz2 translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.zip |
move *.html to *.md
Diffstat (limited to 'files/fr/web/api/htmlelement/iscontenteditable/index.md')
-rw-r--r-- | files/fr/web/api/htmlelement/iscontenteditable/index.md | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/files/fr/web/api/htmlelement/iscontenteditable/index.md b/files/fr/web/api/htmlelement/iscontenteditable/index.md new file mode 100644 index 0000000000..dd7c704998 --- /dev/null +++ b/files/fr/web/api/htmlelement/iscontenteditable/index.md @@ -0,0 +1,79 @@ +--- +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 +--- +<div> +<div>{{ APIRef("HTML DOM") }}</div> +</div> + +<p>La propriété en lecture seule <strong><code>HTMLElement.isContentEditable</code></strong> renvoie un {{jsxref("Boolean")}} qui est <code>true </code><em>(vrai)</em> si le contenu de l'élément est éditable ; sinon elle renvoie <code>false</code><em>(faux)</em>.</p> + +<h2 id="Syntax">Syntaxe</h2> + +<pre class="syntaxbox"><em>editable</em> = <em>element</em>.isContentEditable +</pre> + +<h2 id="Exemple">Exemple</h2> + +<h3 id="JavaScript">JavaScript</h3> + +<pre class="brush: js">document.getElementById("infoText1").innerHTML += document.getElementById("myText1").isContentEditable; +document.getElementById("infoText2").innerHTML += document.getElementById("myText2").isContentEditable;</pre> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: 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></pre> + +<h3 id="Résultat">Résultat</h3> + +<p>{{ EmbedLiveSample('Example') }}</p> + +<h2 id="Spécifications">Spécifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>Pas de changement de la dernière image, {{SpecName('HTML5.1')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML5.1', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}</td> + <td>{{Spec2('HTML5.1')}}</td> + <td>L'image de {{SpecName('HTML WHATWG')}}, n'est pas changée par {{SpecName('HTML5 W3C')}}</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', "editing.html#dom-iscontenteditable", "HTMLElement.contenteditable")}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Image de {{SpecName('HTML WHATWG')}}, definition initiale.</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> + +<p>{{Compat("api.HTMLElement.isContentEditable")}}</p> + +<h2 id="Voir_aussi">Voir aussi</h2> + +<ul> + <li>{{domxref("element.contentEditable")}}</li> + <li>L'attribut global <a href="/en-US/docs/Web/HTML/Global_attributes/contenteditable">contenteditable</a>.</li> +</ul> |