3 ms·
Good idea... but I'm not sure the "supports" attribute would be friendly to configure, and standardisation would be hard.
by ilmiont 11y ago
Good idea... but I'm not sure the "supports" attribute would be friendly to configure, and standardisation would be hard.
- jtolmar 11y ago<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.
- majewsky 11y ago> 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.
- sp332 11y agoIt looks like you'd define your own DTD, to be a subset of HTML.
- jtolmar 11y ago> 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.