Skip to content

Commit 0eb0a14

Browse files
committed
Editorial: add contenteditable enumerated attribute table
Helps with #9832
1 parent f3e23c7 commit 0eb0a14

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

source

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80288,19 +80288,42 @@ addShortcutKeyLabel(document.getElementById('c'));</code></pre>
8028880288

8028980289
<p>The <dfn element-attr for="html-global"><code
8029080290
data-x="attr-contenteditable">contenteditable</code></dfn> content attribute is an
80291-
<span>enumerated attribute</span> whose keywords are the empty string, <code
80292-
data-x="">true</code>, <code data-x="">plaintext-only</code> and <code data-x="">false</code>.
80293-
The empty string and the <code data-x="">true</code> keyword map to the <i>true</i> state.
80294-
The <code data-x="">plaintext-only</code> keyword maps to the <i>plaintext-only</i> state.
80295-
The <code data-x="">false</code> keyword maps to the <i>false</i> state. In addition, there is a
80296-
fourth state, the <i>inherit</i> state, which is the <i data-x="missing value default">missing
80297-
value default</i> and <i data-x="invalid value default">invalid value default</i>.</p>
80291+
<span>enumerated attribute</span> with the following keywords and states:</p>
8029880292

80299-
<p>The <i>true</i> state indicates that the element is editable. The <i>plaintext-only</i> state
80300-
indicates that only the element's raw text content is editable, but rich text formatting is
80301-
disabled. The <i>inherit</i> state indicates that the element is the same kind of editable (or
80302-
not editable) as the parent element. The <i>false</i> state indicates that the element is not
80303-
editable.</p>
80293+
<table>
80294+
<thead>
80295+
<tr>
80296+
<th>Keyword
80297+
<th>State
80298+
<th>Brief description
80299+
<tbody>
80300+
<tr>
80301+
<td><dfn attr-value for="html-global/contenteditable"><code
80302+
data-x="attr-contenteditable-true">true</code></dfn>
80303+
<td rowspan=2><dfn data-x="attr-contenteditable-true-state">true</dfn>
80304+
<td rowspan=2>Indicates the element is editable.
80305+
<tr>
80306+
<td>(The empty string)
80307+
<tr>
80308+
<td><dfn attr-value for="html-global/contenteditable"><code
80309+
data-x="attr-contenteditable-false">false</code></dfn>
80310+
<td><dfn data-x="attr-contenteditable-false-state">false</dfn>
80311+
<td>The element is not editable.
80312+
<tr>
80313+
<td><dfn attr-value for="html-global/contenteditable"><code
80314+
data-x="attr-contenteditable-plaintextonly">plaintext-only</code></dfn>
80315+
<td><dfn data-x="attr-contenteditable-plaintextonly-state">plaintext-only</dfn>
80316+
<td>Only the element's raw text content is editable, rich formatting is disabled.
80317+
<tr>
80318+
<td>
80319+
<td><dfn data-x="attr-contenteditable-inherit-state">inherit</dfn>
80320+
<td>The element is editable (or not) based on the parent element's state.
80321+
</table>
80322+
80323+
80324+
<p>The attribute's <i data-x="missing value default">missing value default</i> and <i
80325+
data-x="invalid value default">invalid value default</i> are both the <span
80326+
data-x="attr-contenteditable-inherit-state">inherit</span> state.</p>
8030480327

8030580328
<div class="example">
8030680329
<p>For example, consider a page that has a <code>form</code> and a <code>textarea</code> to

0 commit comments

Comments
 (0)