[whatwg] Textarea Wishlist
lachlan.hunt at iinet.net.au
Wed Jun 30 19:05:33 PDT 2004
Ryan Johnson wrote:
> 3) Extensible syntax highlighting (coloring). I am aware that a ton of
> code editors don't even do this well. The ability to load a syntax
> definition file and have it color a block of code would do wonders for
> making the web a more friendly place to script.
The difficulty with this comes from creating a syntax definition file
that can accurately describe the syntax and colour coding necessary for
whatever lanugage it's describing, whether it be XML/HTML/SGML, C/C++,
Java, Perl, or any other language. Such a file type would be out of the
scope of web apps, but perhaps providing the ability to reference a
syntax definition file with a URI could be included.
However, there's still the problem that no standard file type for
that purpose exists; and, AFAIK, no work is currently being done to
define a standard fomat. Many editors use proprietary formats with
varying degrees of extensibility, or even have the syntax detection and
colouring hard coded within the application, but I doubt any of those
would be suitable for use in a web application. One would most likely
need some kind of new XML language, but then your still stuck with the
backwards compatibity issues of current UAs not supporting that new format.
Although, you've given me another idea. It would be nice to be able
to reference a DTD or Schema that could be used by the UA to validate
the user's input as a valid (X)HTML/XML fragment. That feature would be
really helpful with many blogs that currently suffer from validation
problems that come with readers posting comments containing markup.
lachlan.hunt at lachy.id.au
More information about the whatwg