aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/htmlelement/contenteditable/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-br/web/api/htmlelement/contenteditable/index.html')
-rw-r--r--files/pt-br/web/api/htmlelement/contenteditable/index.html102
1 files changed, 102 insertions, 0 deletions
diff --git a/files/pt-br/web/api/htmlelement/contenteditable/index.html b/files/pt-br/web/api/htmlelement/contenteditable/index.html
new file mode 100644
index 0000000000..22d356ae0d
--- /dev/null
+++ b/files/pt-br/web/api/htmlelement/contenteditable/index.html
@@ -0,0 +1,102 @@
+---
+title: HTMLElement.contentEditable
+slug: Web/API/HTMLElement/contentEditable
+translation_of: Web/API/HTMLElement/contentEditable
+---
+<div>
+<div>{{APIRef("HTML DOM")}}</div>
+</div>
+
+<p>A propriedade <strong><code>HTMLElement.contentEditable </code></strong>é usada para indicar se o elemento é editável ou não. Esse atributo enumerado pode ter os seguintes valores:</p>
+
+<ul>
+ <li><code>"true"</code> Indica que o elemento é editável;</li>
+ <li><code>"false"</code> Indica que o elemento não pode ser editável;</li>
+ <li><code>"inherit"</code> Indica que o elemento herda o status editável de seu pai.</li>
+</ul>
+
+<p>Você pode usar a propriedade {{domxref( "HTMLElement.isContentEditable")}} para testar o valor calculado {{domxref ("Boolean")}} desta propriedade.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox"><em>editable</em> = element.contentEditable element.contentEditable= "true"
+</pre>
+
+<h2 id="Especificação">Especificação</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentário</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'interaction.html#contenteditable', 'contenteditable')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_Browsers">Compatibilidade Browsers</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>11</td>
+ <td>{{CompatGeckoDesktop(1.9)}}</td>
+ <td>6<sup>[1]</sup></td>
+ <td>10.6</td>
+ <td>3.2</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>3</td>
+ <td>{{CompatGeckoMobile(1.9)}}</td>
+ <td>6<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>5</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] Internet Explorer has a bunch of bugs regarding the implementation of this feature. IE10 crashes in some cases when editing lists (<a href="https://connect.microsoft.com/IE/feedback/details/796187/internet-explorer-10-crash-with-contenteditable-list">bug 796187</a>). IE11+ uses invalid positioning for caret when an element is floated (<a href="https://connect.microsoft.com/IE/feedback/details/858749">bug 858749</a>). In IE9-10 the window freezes when using mousewheel while dragging (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/809254">bug 809254</a>). IE10-11 does not fire the <a href="/en-US/docs/Web/Events/input"><code>input</code></a> event (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/794285">bug 794285</a>). IE10 crashes after selecting "Cut" from the context menu (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/801770">bug 801770</a>). IE11+ does not allow placing the caret in an empty table cell (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/807199">bug 807199</a>). IE10 does not fire <a href="/en-US/docs/Web/Events/contextmenu"><code>contextmenu</code></a> event when right-clicking on misspelled words (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/774350">bug 774350</a>). IE11 appends {{HTMLElement("br")}} elements to {{HTMLElement("body")}} when showing/hiding an {{HTMLElement("iframe")}} with contenteditable document inside (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/864804">bug 864804</a>). IE11 does not allow disabling resize handles for images/inputs (<a href="https://connect.microsoft.com/IE/feedbackdetail/view/907422">bug 907422</a>).</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>{{domxref("HTMLElement.isContentEditable")}}</li>
+ <li>The <a href="/en-US/docs/Web/HTML/Global_attributes/contenteditable">contenteditable</a> global attribute.</li>
+ <li><a href="https://medium.com/medium-eng/why-contenteditable-is-terrible-122d8a40e480">Why ContentEditable is Terrible, Or: How the Medium Editor Works</a></li>
+</ul>