Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good idea... but I'm not sure the "supports" attribute would be friendly to configure, and standardisation would be hard.


<input type="editor" supports="images;links;headings" spans="italic;bold;blinky" extras="carousel" oncarousel="function (event) {return document.createElement('div') /* TODO: implement carousel */; }">

With "supports" being common things with extra markup (especially images and links), spans deferring your problems to css classes, and extras deferring your problems to javascript. The element returned by an extra would always be treated as a single black box by the editor.


> supports="headings"

* Does it allow further markup inside the headings? If so, which tags? strong? emph? span? a?

* Which attributes are allowed on the <h1> etc. tags? class? style? name? id? lang? dir? id?

You see where this is going.

> spans="blinky"

Hell no.


> You see where this is going.

Yes: the wrong direction.

Trying to support every possible thing obviously won't work - we can't replace writing HTML with a clever enough rich text field. But you can still make progress on web usability by solving the most obvious bits and adding some hooks for the easiest ways to extend it.


It looks like you'd define your own DTD, to be a subset of HTML.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: