Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clipboard): allow pasting markdown and html files from the system to the editor #1915

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

EchoEllet
Copy link
Collaborator

@EchoEllet EchoEllet commented Jun 13, 2024

Description

Allow pasting markdown and HTML files into the editor from the system files.

At the moment, if you try to copy a file from the system on the desktop, and paste it into the editor, you will get the file name, this PR aims to use super_clipboard and existing Markdown & HTML converting functionality

Even though this is not directly related to this PR, Markdown, and HTML converting from and to Delta are currently far from perfect, the current implementation could improved a lot however it will likely not work like expected, due to differences between Html and Delta, see this comment for more info.

If the Markdown and HTML implementation improved or changed, no changes are required to QuillController

The following example for copying a Markdown file:

Before

image

After

image

This PR also includes changes that are not related such as the use of onError callback from super_clipboard in SuperClipboardService implementation

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the package version in pubspec.yaml files.
  • All existing and new tests are passing.
  • I have run the commands in ./scripts/before_push.sh and it all passed successfully

Breaking Change

Does your PR require developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@EchoEllet EchoEllet marked this pull request as ready for review June 13, 2024 13:42
@EchoEllet EchoEllet merged commit 33ba965 into master Jun 13, 2024
2 checks passed
@EchoEllet
Copy link
Collaborator Author

@singerdmx
Let me know if you want to revert or leave notes on additional changes.

@EchoEllet EchoEllet deleted the feat/markdown-html-files-clipboard-paste branch June 14, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant