- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Fri, 14 Jul 2017 18:16:45 +0000
- To: public-svg-issues@w3.org
AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "Interactivity chapter": == Add `contenteditable` attribute for SVG text elements == The HTML [`contenteditable` attribute](https://html.spec.whatwg.org/multipage/interaction.html#contenteditable) makes it easy to make interactive inputs out of styled text. It would be very useful to have it in SVG, too. Presently, all browsers I've tested support editable SVG text in inline SVG, where a parent HTML element is set to `contenteditable`. However, it is not very useful in practice: - You cannot control which elements within the SVG are editable. - If the user deletes the initial text content, they delete the SVG elements, too (or at the very least, end up with the text input cursor adding content _beside_ the markup instead of inside it). Microsoft Edge supports the `contenteditable` attribute directly on SVG `<text>` elements in inline SVG, but most other browsers don't. There are issues and edge cases with `contenteditable` that still need to be resolved in the HTML specs, particularly re accessibility. However, none of those issues would get any worse by extending the functionality to SVG (so long as the SVG definition refers to HTML & therefore automatically stays in sync). The feature only applies to interactive environments, so there would be no implementation cost to most non-browser SVG environments. See https://github.com/w3c/svgwg/issues/332
Received on Friday, 14 July 2017 18:16:51 UTC