[whatwg] Syntax Highlighting [was: several messages]

James Graham jg307 at cam.ac.uk
Wed Dec 8 01:51:56 PST 2004


Ian Hickson wrote:

>On Tue, 9 Nov 2004, James Graham wrote:
>  
>
>>The details of that suggestion were way too complex. But replace all the 
>>rubbish about URIs with 'allow an optional attribute specifying the MIME 
>>type of the data type expected in the textarea'. Since many browsers use 
>>text editing components that already support features such as syntax 
>>highlighting (or, I would be surprised if they don't)
>>    
>>
>
>They don't. At least, none of the browsers I know about have syntax 
>highlighting editors of that kind, as far as I know.
>
>  
>
I would have thought that any browser using a standard widget set might 
already have syntax highlighting avaliable (but disabled). However I 
neglected the fact that most browsers use custom widget sets to deal 
with CSS requirements.

>  
>
>>very plausible that at least some browsers would make use of this 
>>attribute to provide a better text editing experience. Since many 
>>applications (e.g. CMS systems) require the input of specific data types 
>>(html) in text areas, this could be a big usability win for any browser 
>>that implements it. Clearly syntax highlighting is not the only 
>>possibility - a spellchecker could be set up to ignore certian data 
>>types or certian poritions of the text in a particular data type.
>>    
>>
>
>Given that UAs haven't generally done even basic spell-checking, I don't 
>feel confident that they would do this.
>
That's not quite true; Safari has AFAIK implemented spell checking in 
text areas for some time, Lindows have implemented it in Mozilla and are 
now contributing the code to mozilla.org [1] and a quick check on Google 
indicates that Opera supports spell checking with Aspell [2] and that 
there exist several spell checking addons for IE. So basic spell 
checking is avaliable, or at least imminently avaliable, in one way or 
another for all major graphical UAs.

> I certainly don't feel confident 
>enough to put this in the current versions of the spec.
>
I'm not sure why. It has almost no side effects since it's just a hint 
to the client and doesn't affect the actual data being uploaded in any 
way. It it perfectly backwards compatible. Since many HTML applications 
require text entry and most people who edit text (other than in a web 
form) choose to use an editor other than notepad there is clearly demand 
for better-than-notepad text editing in HTML. Without information about 
the data type expected, UAs can't really provide this. With that 
information they can.

1] https://bugzilla.mozilla.org/show_bug.cgi?id=58612
[2] http://www.opera.com/support/tutorials/opera/spellcheck/



More information about the whatwg mailing list