Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Web] Pasting HTML Doesn't Work Propertly #1998

Copy link
Copy link
Open
@jezell

Description

@jezell
Issue body actions

Is there an existing issue for this?

Flutter Quill version

9.5.13

Steps to reproduce

Copy HTML with bullets on web, paste.

A few problems here:

First off the browser won't actually let non plain text formats through using the clipboard API, so the clipboard service always thinks there is no html on the clipboard. On web, non text formats are only available from the paste event.

Steps to fix:

  1. Handle "paste" event on window instead of using standard paste hotkey logic (note that the same path is also needed to paste things like images from the clipboard on web). If a quill node is focused, handle the paste event and insert the data into the quill editor. The paste event will contain, files, and multiple clipboard formats that are unavailable to the browser clipboard API.
  2. If button action is pressed and initiates a paste, unfortunately, the only way to get the data is using a browser extension (this is what google docs does). Until there is a browser extension for flutter quill, quill should do what google docs does when you don't have the browser extension installed, which is display a dialog when pressing the paste button that explains the limitation and shows the hotkey they need to press in order to paste. Once there is an extension, this dialog can provide a link to install the browser extension.

Expected results

Bullets are preserved

Actual results

Bullets are not preserved

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responsePending additional information or feedback from the issue creatorPending additional information or feedback from the issue creatorblockedThis issue cannot be resolved due to an obstacle or dependency.This issue cannot be resolved due to an obstacle or dependency.bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededminorMinimal impact or cosmetic issue. Can be resolved at a later time without affecting overall functionMinimal impact or cosmetic issue. Can be resolved at a later time without affecting overall functionwebIssues or feature requests specific to the Web platform.Issues or feature requests specific to the Web platform.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.