W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Proposal: Add HTMLElement.innerText

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 16 Aug 2010 23:43:24 +1200
Message-ID: <AANLkTi=sZS2GhxQeC=dWbbAzV_H_6tt79eEMBGFcqdAf@mail.gmail.com>
On Mon, Aug 16, 2010 at 9:23 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> A more hypothetical use would be a rich text editor that has a "convert to
> plaintext" feature. textContent is not as useful for these use cases, since
> it doesn't handle line breaks and unrendered whitespace properly.
>

There are lots of ways people might want to do that. For example, "convert
to plaintext" features often introduce characters for list bullets (e.g.
'*') and item numbers. (E.g., Mac TextEdit does.) Safari 5 doesn't do
either.

The Gecko plaintext serializer has a comment:
  // Output methods flag bits. There are a frightening number of these,
  // because everyone wants something a little bit different
Satisfying more than a small number of potential users with a single
attribute may be difficult.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100816/c5a1ceaa/attachment-0001.htm>
Received on Monday, 16 August 2010 04:43:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:00 UTC