[html5] r1359 - /

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 7 17:39:18 PST 2008


Author: ianh
Date: 2008-03-07 17:39:17 -0800 (Fri, 07 Mar 2008)
New Revision: 1359

Modified:
   index
   source
Log:
[] (0) Bold/Italic support in contentEditable.

Modified: index
===================================================================
--- index	2008-03-08 00:13:46 UTC (rev 1358)
+++ index	2008-03-08 01:39:17 UTC (rev 1359)
@@ -33547,10 +33547,11 @@
   <p>Otherwise, either the <a href="#html-elements" title="HTML
    elements">HTML element</a> has a <code title=attr-contenteditable><a
    href="#contenteditable0">contenteditable</a></code> attribute set to the
-   false state, or its code title="attr-contenteditable">contenteditable
-   attribute is set to the inherit state and its nearest ancestor <a
-   href="#html-elements" title="HTML elements">HTML element</a> with the
-   <code title=attr-contenteditable><a
+   false state, or its <code title=attr-contenteditable><a
+   href="#contenteditable0">contenteditable</a></code> attribute is set to
+   the inherit state and its nearest ancestor <a href="#html-elements"
+   title="HTML elements">HTML element</a> with the <code
+   title=attr-contenteditable><a
    href="#contenteditable0">contenteditable</a></code> attribute set to a
    state other than the inherit state has its attribute set to the false
    state, or all its ancestors have their <code title=attr-contenteditable><a
@@ -33730,6 +33731,18 @@
     <p>UAs should also offer a way to remove those semantics from marked up
      text, and to remove empty semantic element that have been inserted.</p>
 
+    <p>In response to a request from a user to mark text up in italics, user
+     agents should use the <code><a href="#i">i</a></code> element to
+     represent the semantic. The <code><a href="#em">em</a></code> element
+     should only be used if the user agent is sure that the user means to
+     indicate stress emphasis.</p>
+
+    <p>In response to a request from a user to mark text up in bold, user
+     agents should use the <code><a href="#b">b</a></code> element to
+     represent the semantic. The <code><a href="#strong">strong</a></code>
+     element should only be used if the user agent is sure that the user
+     means to indicate importance.</p>
+
     <p>The exact behaviour is UA-dependent, but user agents must not, in
      response to a request to wrap semantics around some text or to insert or
      remove a semantic element, generate a DOM that is less conformant than
@@ -35755,6 +35768,54 @@
     expression given for the "State" above is true, the string "<code
     title="">false</code>" otherwise.
 
+   <dt>If the <var title="">commandId</var> is <dfn id=bold
+    title=command-bold><code>bold</code></dfn>
+
+   <dd><a href="#editing2">Editing hosts only.</a>
+
+   <dd><strong>Action:</strong> The user agent must act as if the user had
+    requested that the selection <a href="#contenteditable-wrapSemantic">be
+    wrapped in the semantics</a> of the <em title=""><code><a
+    href="#b">b</a></code></em> element (or, again, unwrapped, or have that
+    semantic inserted or removed, as defined by the UA).
+
+   <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+    for editing host commands</a>.
+
+   <dd><strong>Indeterminate When:</strong> Never.
+
+   <dd><strong>State:</strong> True if the selection, or the caret, if there
+    is no selection, is, or is contained within, a <code><a
+    href="#b">b</a></code> element. False otherwise.
+
+   <dd><strong>Value:</strong> The string "<code title="">true</code>" if the
+    expression given for the "State" above is true, the string "<code
+    title="">false</code>" otherwise.
+
+   <dt>If the <var title="">commandId</var> is <dfn id=italic
+    title=command-italic><code>italic</code></dfn>
+
+   <dd><a href="#editing2">Editing hosts only.</a>
+
+   <dd><strong>Action:</strong> The user agent must act as if the user had
+    requested that the selection <a href="#contenteditable-wrapSemantic">be
+    wrapped in the semantics</a> of the <em title=""><code><a
+    href="#i">i</a></code></em> element (or, again, unwrapped, or have that
+    semantic inserted or removed, as defined by the UA).
+
+   <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+    for editing host commands</a>.
+
+   <dd><strong>Indeterminate When:</strong> Never.
+
+   <dd><strong>State:</strong> True if the selection, or the caret, if there
+    is no selection, is, or is contained within, a <code><a
+    href="#i">i</a></code> element. False otherwise.
+
+   <dd><strong>Value:</strong> The string "<code title="">true</code>" if the
+    expression given for the "State" above is true, the string "<code
+    title="">false</code>" otherwise.
+
    <dt>If the <var title="">commandId</var> is <dfn id=formatblock
     title=command-formatBlock><code>formatBlock</code></dfn>
 

Modified: source
===================================================================
--- source	2008-03-08 00:13:46 UTC (rev 1358)
+++ source	2008-03-08 01:39:17 UTC (rev 1359)
@@ -31003,7 +31003,7 @@
   <p>Otherwise, either the <span title="HTML elements">HTML
   element</span> has a <code
   title="attr-contenteditable">contenteditable</code> attribute set to
-  the false state, or its code
+  the false state, or its <code
   title="attr-contenteditable">contenteditable</code> attribute is set
   to the inherit state and its nearest ancestor <span title="HTML
   elements">HTML element</span> with the <code
@@ -31192,6 +31192,18 @@
    marked up text, and to remove empty semantic element that have been
    inserted.</p>
 
+   <p>In response to a request from a user to mark text up in italics,
+   user agents should use the <code>i</code> element to represent the
+   semantic. The <code>em</code> element should only be used if the
+   user agent is sure that the user means to indicate stress
+   emphasis.</p>
+
+   <p>In response to a request from a user to mark text up in bold,
+   user agents should use the <code>b</code> element to represent the
+   semantic. The <code>strong</code> element should only be used if
+   the user agent is sure that the user means to indicate
+   importance.</p>
+
    <p>The exact behaviour is UA-dependent, but user agents must not,
    in response to a request to wrap semantics around some text or to
    insert or remove a semantic element, generate a DOM that is less
@@ -33169,6 +33181,44 @@
    if the expression given for the "State" above is true, the string
    "<code title="">false</code>" otherwise.</dd>
 
+   <dt>If the <var title="">commandId</var> is <dfn title="command-bold"><code>bold</code></dfn></dt>
+
+   <dd><span>Editing hosts only.</span></dd>
+   <dd><strong>Action:</strong> The user agent must act as if the user
+   had requested that the selection <a
+   href="#contenteditable-wrapSemantic">be wrapped in the
+   semantics</a> of the <em title=""><code>b</code></em> element
+   (or, again, unwrapped, or have that semantic inserted or removed,
+   as defined by the UA).</dd>
+   <dd><strong>Enabled When:</strong> The document is <span>ready for
+   editing host commands</span>.</dd>
+   <dd><strong>Indeterminate When:</strong> Never.</dd>
+   <dd><strong>State:</strong> True if the selection, or the caret, if
+   there is no selection, is, or is contained within, a
+   <code>b</code> element. False otherwise.</dd>
+   <dd><strong>Value:</strong> The string "<code title="">true</code>"
+   if the expression given for the "State" above is true, the string
+   "<code title="">false</code>" otherwise.</dd>
+
+   <dt>If the <var title="">commandId</var> is <dfn title="command-italic"><code>italic</code></dfn></dt>
+
+   <dd><span>Editing hosts only.</span></dd>
+   <dd><strong>Action:</strong> The user agent must act as if the user
+   had requested that the selection <a
+   href="#contenteditable-wrapSemantic">be wrapped in the
+   semantics</a> of the <em title=""><code>i</code></em> element
+   (or, again, unwrapped, or have that semantic inserted or removed,
+   as defined by the UA).</dd>
+   <dd><strong>Enabled When:</strong> The document is <span>ready for
+   editing host commands</span>.</dd>
+   <dd><strong>Indeterminate When:</strong> Never.</dd>
+   <dd><strong>State:</strong> True if the selection, or the caret, if
+   there is no selection, is, or is contained within, a
+   <code>i</code> element. False otherwise.</dd>
+   <dd><strong>Value:</strong> The string "<code title="">true</code>"
+   if the expression given for the "State" above is true, the string
+   "<code title="">false</code>" otherwise.</dd>
+
    <dt>If the <var title="">commandId</var> is <dfn title="command-formatBlock"><code>formatBlock</code></dfn></dt>
 
    <dd><span>Editing hosts only.</span></dd>




More information about the Commit-Watchers mailing list