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

[whatwg] Proposal: Add HTMLElement.innerText

From: Diego Perini <diego.perini@gmail.com>
Date: Mon, 16 Aug 2010 16:45:24 +0200
Message-ID: <AANLkTi=jw4bHSmQn9CM_h494gZRcAW8P9-uzMig_koNL@mail.gmail.com>
On Mon, Aug 16, 2010 at 1:43 PM, Robert O'Callahan <robert at ocallahan.org>wrote:

> 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.
>
>
I believe we are mixing up concepts here:

- converting one format to another format (see "convert to plain text"
above)
- extracting the textual part of a format (what "innerText" is supposed to
do)

are completely different approaches and should probably be handled by
different methods.


Diego



> 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/1124b19b/attachment.htm>
Received on Monday, 16 August 2010 07:45:24 UTC

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