<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13808</bug_id>
          
          <creation_ts>2011-08-17 15:31:49 +0000</creation_ts>
          <short_desc>Let users make whitespace visible</short_desc>
          <delta_ts>2015-07-30 23:47:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - HTML Editing APIs</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aryeh Gregor">ayg</reporter>
          <assigned_to name="Aryeh Gregor">ayg</assigned_to>
          <cc>bjartur79</cc>
    
    <cc>ehsan</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          <deadline>2015-07-30</deadline>
          <qa_contact name="HTML Editing APIs spec bugbot">sideshowbarker+html-editing-api</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55308</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-17 15:31:49 +0000</bug_when>
    <thetext>Suggested by Alfonso Martínez de Lizarrondo:
&quot;&quot;&quot;
Related to CSS, one feature that people request and that from my POV should
be done with CSS is the ability to see the &quot;formating blocks&quot;, that&apos;s easy
to do with most of the elements by using a little background image in the
stylesheet and some border, but Opera used to be the only one able to format
&lt;br&gt;, and that&apos;s what people are requesting, to see a glyph where a line
ends like they can do in MS-Word. But I&apos;m not sure that this relates to the
Editing APIs doc.
&quot;&quot;&quot;
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-August/032941.html

This is not something that should actually be in the HTML Editing APIs spec -- it belongs in CSS.  Perhaps something like whitespace-visibility: { visible | invisible }, then maybe a pseudo-element like ::visible-whitespace that lets authors control the color of the glyphs.  This would be fairly nontrivial to define and implement, but it&apos;s worth thinking about as a feature for future versions.

Actually, this is at least as useful for plaintext editing as for rich-text editing.  It can be very useful for source code to be able to tell the difference between tabs and spaces, say.  On Windows I used to use Notepad++ for code editing, and it had a nice option where all whitespace would have a faint glyph on top of it: a centered dot for spaces, a little triangle or something for tab, and a paragraph symbol for line breaks.  So this would definitely be good to support for &lt;textarea&gt; too.  Of course, if white-space is not pre or pre-wrap, it doesn&apos;t make sense to mark spaces/tabs/source newlines specially, and you&apos;d probably want to just mark &lt;br&gt;&apos;s and the ends of blocks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55315</commentid>
    <comment_count>1</comment_count>
    <who name="">bjartur79</who>
    <bug_when>2011-08-17 16:14:30 +0000</bug_when>
    <thetext>Is rendering spaces using black (visible) glyphs instead of white (invisible) ones not a font matter, and thus belonging to the font-* namespace? It&apos;s more or less a question of using glyphs for whitespace, instead of leaving it blank. That&apos;s possible without any magic by simply using a font with such glyphs for whitespace characters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55317</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-17 16:27:17 +0000</bug_when>
    <thetext>That&apos;s a good point, and it was my first thought too, but it&apos;s not that simple:

1) I assume at least tabs and newlines are handled exclusively by whatever is doing the text layout, not by the font.  Thus there&apos;d be no way to do this for tabs or newlines by modifying the font, only regular spaces.

2) Authors often just have pages use the user&apos;s default font.  This is recommended practice for running text (as opposed to headings and such), so that the user can read in whatever fonts they&apos;re most used to.  The author can&apos;t modify the user&apos;s default fonts (or any system fonts) to replace particular glyphs.

3) A typical web author is not going to know how to modify fonts appropriately.

4) We&apos;d want the option for the placeholder glyphs for whitespace to be a different color, specifically a lighter color.  Making·&amp;#8203;every·&amp;#8203;space·&amp;#8203;a·&amp;#8203;black·&amp;#8203;dot·&amp;#8203;would·&amp;#8203;be·&amp;#8203;very·&amp;#8203;distracting, but a gray dot could be useful without being annoying.  (Notepad++ used a well-calculated shade of gray when I used it, so it was there when I wanted it but I didn&apos;t notice it otherwise.)

It&apos;s possible that (2) and/or (3) could be worked around with some kind of @font-face hackery, but I think the other problems still make this approach prohibitive in practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55318</commentid>
    <comment_count>3</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-17 16:30:31 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; 1) I assume at least tabs and newlines are handled exclusively by whatever is
&gt; doing the text layout, not by the font.  Thus there&apos;d be no way to do this for
&gt; tabs or newlines by modifying the font, only regular spaces.

At least in Gecko, whitespace is collapsed in non-preformatted mode, but I&apos;m not aware of any other special processing on whitespaces in layout.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>