Skip to content

The ClipboardPipeline and PasteFromOffice should allow for common HTML string normalisation before conversion to view #17309

@niegowski

Description

@niegowski

📝 Provide a description of the new feature

The ClipboardPipeline is performing some HTML normalization (on string) just before converting it to the view document fragment:

if ( dataTransfer.getData( 'text/html' ) ) {
contentData = normalizeClipboardHtml( dataTransfer.getData( 'text/html' ) );
} else if ( dataTransfer.getData( 'text/plain' ) ) {
contentData = plainTextToHtml( dataTransfer.getData( 'text/plain' ) );
}

Those cases could be unified as an extension point in the ClipboardPipeline so non-parsed data could be processed before conversion to the view document fragment.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

Metadata

Metadata

Assignees

Labels

package:clipboardpackage:paste-from-officestatus:in-progressSet automatically when an issue lands in the "In progress" column. We are working on it.support:2An issue reported by a commercially licensed client.type:featureThis issue reports a feature request (an idea for a new functionality or a missing option).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions