Skip to content

implement enhanced clipboard for html editor #3150

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gtalha07
Copy link
Contributor

@gtalha07 gtalha07 commented Jun 27, 2025

Description:

Currently, appflowy_editor own clipboard APIs don't support handling rich text copy/paste. But interestingly, they have support in their parent repo which is built on flutter front-end and discovered very interesting package they've been using for handling formatted text and custom events: https://pub.dev/packages/super_clipboard.

The package itself relies on rust for low level functionality as they've described which is of course, efficient but also has a way of supporting custom json objects (imo can be very good for handling our acter objects inline). And not only handles events in-app but also supports receiving external events (like browser or another app). Although in some platforms, some might impose restrictions because of their nature but normally it works well as it's been previewed below.

PREVIEW:

Tested it with Firefox Browser and showcasing clipboard events receiving and sending:

Screen.Recording.2025-06-27.at.20.01.38.mov

General usage showcase:

(DESKTOP):

Screen.Recording.2025-06-27.at.20.17.45.mov

(MOBILE):

ScreenRecording_06-27-2025.21-35-33_1.MP4

@gtalha07 gtalha07 added bug Something isn't working s-chat Features and Bugs related to the chat section c-html-editor Appflowy Editor aspects labels Jun 27, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Product Jun 27, 2025
Copy link
Contributor

Hey there 👋,
and thanks for the contribution. But it seems like you forgot to

  • 📰 Add a markdown file in .changes/ explaining what changed

Copy link

codecov bot commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 25.37313% with 100 lines in your changes missing coverage. Please review.

Project coverage is 46.68%. Comparing base (acb1c09) to head (990a0cf).

Files with missing lines Patch % Lines
...oolkit/html_editor/services/clipboard_service.dart 2.70% 36 Missing ⚠️
...ditor/clipboard/commands/custom_paste_command.dart 22.72% 34 Missing ⚠️
...editor/clipboard/commands/custom_copy_handler.dart 27.27% 16 Missing ⚠️
...pp/lib/common/toolkit/html_editor/html_editor.dart 65.38% 9 Missing ⚠️
.../features/chat_ng/actions/copy_message_action.dart 0.00% 3 Missing ⚠️
...atures/chat_ng/widgets/message_actions_widget.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3150      +/-   ##
==========================================
- Coverage   46.75%   46.68%   -0.08%     
==========================================
  Files         948      951       +3     
  Lines       57819    57939     +120     
==========================================
+ Hits        27035    27049      +14     
- Misses      30784    30890     +106     
Flag Coverage Δ
integration-test 58.01% <ø> (-0.06%) ⬇️
unittest 39.18% <25.37%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c-html-editor Appflowy Editor aspects s-chat Features and Bugs related to the chat section
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant