Intent to prototype: contenteditable=plaintext-only

264 views
Skip to first unread message

Masayuki Nakano

unread,
Oct 4, 2024, 1:26:54 AMOct 4
to dev-platform, Hsin-Yi Tsai, Brian Birchill Birchill Birtles, Olli Pettay, Makoto Kato
Summary: Support new `contenteditable` value which is `plaintext-only`.
It disallows users to edit style and stops `execCommand` with styling
commands like `"bold"` working.

Bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=1922723

Specification:
https://html.spec.whatwg.org/multipage/interaction.html#attr-contenteditable

Platform coverage: All platforms

DevTools bug: N/A

Other browsers: Chrome and Safari already support this. However, Chrome
override the `white-space` property of
`*[contenteditable=plaintext-only]` to make the editor always work with
preformatted text. We should follow Safari's behavior.

web-platform-tests: There was no tests. I'm adding basic tests into
`editing/plaintext-only` and this feature is enabled in our CI to run
the tests under this directory.

--
Masayuki Nakano <masa...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko

Reply all
Reply to author
Forward
0 new messages