[whatwg] Proposal: Add HTMLElement.innerText

Robert O'Callahan robert at ocallahan.org
Mon Aug 16 04:43:24 PDT 2010


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-0002.htm>


More information about the whatwg mailing list