mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 12:56:59 +00:00
[GH-ISSUE #2185] [FR] InApp Copy & Paste. Support parsing all the blocks when pasting the content copied in AppFlowy #890
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#890
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LucasXu0 on GitHub (Apr 4, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2185
Originally assigned to: @LucasXu0 on GitHub.
Description
We want to paste all the selected content, including code blocks, images and so on, not only the texts.
Steps
Impact
users who use copy and paste in app.
Additional Context
We have been converting the selected content into HTML and plain text, and then parsing it when pasting the content in the app. However, I believe that instead of converting it, we can simply save the selected content in memory. This way, when we paste the content in the app, we can just insert the selected content back without the need for parsing it again.
@Pranav2612000 commented on GitHub (Apr 6, 2023):
Hey @LucasXu0 I'll like to work on this issue.
@LucasXu0 commented on GitHub (Apr 6, 2023):
Hey, @Pranav2612000. Nice! I have assigned it to you. Just let me know if you need more context.
@Pranav2612000 commented on GitHub (Apr 7, 2023):
Hey @LucasXu0 I was able to setup this repo locally and was able to run a clean & rebuild all to start the app. I was able to reproduce the issue - copying pasting a codeblocks makes it lose its 'code block'ness.
I was also reading the architecture and the documentation, and if I understand correctly, these changes would be need to be done in the flutter editor, i.e the appflowy-editor ( https://github.com/AppFlowy-IO/appflowy-editor ) repo. Right?
Any other tips for a new contributor?
@Pranav2612000 commented on GitHub (Apr 7, 2023):
Was able to set up the appflowy-editor and I noticed that the appflowy-editor has an image block on which I'm able to reproduce this issue, but I don't see a code block in the editor. Why is that?
@LucasXu0 commented on GitHub (Apr 7, 2023):
Hey, @Pranav2612000, the code block is defined in AppFlowy and registered to appflowy_editor.
Yes, you should modify the function _handleCopy in copy_paste_handler.dart.
Here's my idea:
@Pranav2612000 commented on GitHub (Apr 7, 2023):
Here's a WIP PR I've created for early feedback - https://github.com/AppFlowy-IO/appflowy-editor/pull/49
@LucasXu0 When you say
Save the selected nodes when the user copies within the app.Did you mean something like what I've done? Or am I off track here?@LucasXu0 commented on GitHub (Apr 10, 2023):
@Pranav2612000. Actually, what I meant was that we should save the selected nodes in memory, so that we don't need to parse the HTML again to retrieve them.
Here's the pseudocode.
@Pranav2612000 commented on GitHub (Apr 18, 2023):
Sorry @LucasXu0 I was on a vacation last week and couldn't get back sooner.
I've now updated the PR to use the approach you suggested.
There are still some edge cases that need to be fixed. But can you take a look and let me know if I'm moving in the right direction?
@Pranav2612000 commented on GitHub (Apr 30, 2023):
@LucasXu0 Can you review the PR? I've fixed the edge cases and i think it's working as expected now.
@Pranav2612000 commented on GitHub (May 5, 2023):
@LucasXu0 ^^Bumping this up
@LucasXu0 commented on GitHub (May 5, 2023):
Hey, @Pranav2612000. Just commented on your PR.
@Pranav2612000 commented on GitHub (May 12, 2023):
@LucasXu0 I've fixed those changes. The PR is ready for review again. @Xazin has also reviewed and approved the changes. Can you take a look again?
@LucasXu0 commented on GitHub (May 12, 2023):
@Pranav2612000. Sure. Let me take a look.
@annieappflowy commented on GitHub (Jun 12, 2023):
Status?