Skip to content

Commit

Permalink
Editorial: add contenteditable enumerated attribute table
Browse files Browse the repository at this point in the history
Helps with #9832
  • Loading branch information
keithamus committed Nov 24, 2023
1 parent f3e23c7 commit 0eb0a14
Showing 1 changed file with 35 additions and 12 deletions.
47 changes: 35 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -80288,19 +80288,42 @@ addShortcutKeyLabel(document.getElementById('c'));</code></pre>

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

<p>The <i>true</i> state indicates that the element is editable. The <i>plaintext-only</i> state
indicates that only the element's raw text content is editable, but rich text formatting is
disabled. The <i>inherit</i> state indicates that the element is the same kind of editable (or
not editable) as the parent element. The <i>false</i> state indicates that the element is not
editable.</p>
<table>
<thead>
<tr>
<th>Keyword
<th>State
<th>Brief description
<tbody>
<tr>
<td><dfn attr-value for="html-global/contenteditable"><code
data-x="attr-contenteditable-true">true</code></dfn>
<td rowspan=2><dfn data-x="attr-contenteditable-true-state">true</dfn>
<td rowspan=2>Indicates the element is editable.
<tr>
<td>(The empty string)
<tr>
<td><dfn attr-value for="html-global/contenteditable"><code
data-x="attr-contenteditable-false">false</code></dfn>
<td><dfn data-x="attr-contenteditable-false-state">false</dfn>
<td>The element is not editable.
<tr>
<td><dfn attr-value for="html-global/contenteditable"><code
data-x="attr-contenteditable-plaintextonly">plaintext-only</code></dfn>
<td><dfn data-x="attr-contenteditable-plaintextonly-state">plaintext-only</dfn>
<td>Only the element's raw text content is editable, rich formatting is disabled.
<tr>
<td>
<td><dfn data-x="attr-contenteditable-inherit-state">inherit</dfn>
<td>The element is editable (or not) based on the parent element's state.
</table>


<p>The attribute's <i data-x="missing value default">missing value default</i> and <i
data-x="invalid value default">invalid value default</i> are both the <span
data-x="attr-contenteditable-inherit-state">inherit</span> state.</p>

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

0 comments on commit 0eb0a14

Please sign in to comment.