Make HTML inserters of `HTMLEditor` aware of `contenteditable=plaintext-only`
Categories
(Core :: DOM: Editor, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
document.execCommand("insertHTML")
and the paste handlers.
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Comment 1•29 days ago
|
||
Chrome sets beforeinput.data
instead of beforeinput.dataTransfer
, but
Input Events Level 2 spec defines that browsers should set dataTransfer
when
contenteditable [1]. Therefore, the new WPT expects dataTransfer
.
However, it's unclear that the dataTransfer
should have text/html
or only
text/plain
. From web apps point of view, text/html
data may make them
serialize the rich text format to plaintext without any dependencies of browsers
and OS. On the other hand, they cannot distinguish whether the user tries to
paste with or without formatting when contenteditable=true
. Therefore, I
filed a spec issue for this. We need to be back later about this issue.
Depends on D223670
Assignee | ||
Comment 2•29 days ago
|
||
Depends on D223908
Comment 5•23 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2e3f866560e2
https://hg.mozilla.org/mozilla-central/rev/39f1a092f31f
Assignee | ||
Comment 7•22 days ago
|
||
If dom.element.contenteditable.plaintext-only.enabled
is false
,
the API throws an exception. Therefore, the following tests cannot check
the result. So, we should not use it. Instead,
.setAttribute("contenteditable", "plaintext-only")
is fine.
Comment 8•22 days ago
|
||
Comment on attachment 9428993 [details]
Bug 1920646 - Make editing/plaintext-only
stop doing .contentEditable = "plaintext-only"
r=m_kato!,#dom-core
Revision D224576 was moved to bug 1922712. Setting attachment 9428993 [details] to obsolete.
Description
•