You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTML contenteditable attribute 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.
The text was updated successfully, but these errors were encountered:
The HTML
contenteditable
attribute 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: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.
The text was updated successfully, but these errors were encountered: