Code Monkey home page Code Monkey logo

Comments (8)

BangKk avatar BangKk commented on June 13, 2024 1

@doodlewind @zuoxiaodong0815 Thank you guys. I have found other more issues about clipboard and I'm trying to debug the code to solve them. I'm not sure whether it will be done, but later I'll submit the other issues.

from blocksuite.

BangKk avatar BangKk commented on June 13, 2024

I'm trying to solve this issue, and I think should remove handleBlockSplit code here.
Can someone please tell me why there need split block? Thanks a lot.

shouldSplitBlock &&
(await handleBlockSplit(
page,
focusedBlockModel,
textRangePoint.index,
0
));

from blocksuite.

Flrande avatar Flrande commented on June 13, 2024

I'm trying to solve this issue, and I think should remove handleBlockSplit code here.
Can someone please tell me why there need split block? Thanks a lot.

cc @fourdim @zuoxiaodong0815

from blocksuite.

zuoxiaodong0815 avatar zuoxiaodong0815 commented on June 13, 2024

I'm trying to solve this issue, and I think should remove handleBlockSplit code here. Can someone please tell me why there need split block? Thanks a lot.

shouldSplitBlock &&
(await handleBlockSplit(
page,
focusedBlockModel,
textRangePoint.index,
0
));

When the cursor is positioned in the middle of a block, the block needs to be split when pasting

from blocksuite.

zuoxiaodong0815 avatar zuoxiaodong0815 commented on June 13, 2024
2023-09-05.10.08.49.mov

This is the split block case.

from blocksuite.

BangKk avatar BangKk commented on June 13, 2024

I'm trying to solve this issue, and I think should remove handleBlockSplit code here. Can someone please tell me why there need split block? Thanks a lot.

shouldSplitBlock &&
(await handleBlockSplit(
page,
focusedBlockModel,
textRangePoint.index,
0
));

When the cursor is positioned in the middle of a block, the block needs to be split when pasting

Thank you for clarifying, it's much clearer for me. Maybe more product design clarification is needed here.

from blocksuite.

doodlewind avatar doodlewind commented on June 13, 2024

@zuoxiaodong0815 I don't think we should add \n in the case you provided. A part of text can just be inserted unless it's copied with \n at the end together. @BangKk please feel free to modify the behavior here.

from blocksuite.

zuoxiaodong0815 avatar zuoxiaodong0815 commented on June 13, 2024

Yes, you are right @doodlewind . The issue is needed to be fixed. I just show why to split a block when focus in the middle of the block.
The right behave when not selected whole blocks is that the selected content should be removed, and after split to tow parts, the first pasted block join in the end of the first part, the last pasted block join in the begin of the last part. This issue is about the case of the behavior.
image

The right behave when selected whole blocks is that the selected content does not be removed, the focus block does not be split yet, the pasted content should pasted at the behind of selected blocks.
image

from blocksuite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.