w3c / editing

Specs and explainers maintained by the editing task force
http://w3c.github.io/editing/
Other
193 stars 40 forks source link

Should contenteditable=plaintext-only be standardized? #162

Closed xiaochengh closed 1 year ago

xiaochengh commented 7 years ago

This is a blocking issue of removing webkit-user-modify from Blink.

There seems to be an important use case of contenteditable=plaintext-only in Chrome DevTools:

In the "Elements" panel, we can modify a tag (tag name, style, class and other attributes) by doubleclicking at the tag, which turns certain part of the tag plaintext editable (as shown by the attachment screenshot from 2017-03-10 13 50 57 ). When we finish editing, we can click outside or press Esc to switch the editable part back to uneditable.

DevTools currently implements this functionality by making certain element switch between "-webkit-user-modify: read-only" and "-webkit-user-modify: read-write-plaintext-only". There doesn't seem to be an easy way to convert the implementation to follow the standards, as the standards do not provide any means for plaintext editing other than and