Skip to content

Clarify whether dataTransfer may have text/html when pasting rich text into contenteditable=plaintext-only #162

Description

@masayuki-nakano

According to Input Events Level 2, beforeinput of insertFromPaste should have data as null and dataTransfer when contenteditable. However, it's unclear that whether the dataTransfer should or should not have text/html when the user pasts into contenteditable=plaintext-only.

From point of view of web apps, if dataTransfer has text/html as same as contenteditable=true, they can serialize the HTML to plaintext by themselves to avoid dependency of browser/OS.

On the other hand, inputType does not have insertFromPaste for "Paste without format" (Ctrl + V on Firefox/Chrome for Windows). Therefore, web apps cannot distinguish whether the user pasting with or without format.

Perhaps, there should be new inputType value and dataTransfer may have text/html data even when pasting without format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    level 3Needs to be resolved for level 3

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions