TypeCellOS / TypeCellOS/BlockNote
Selecting blocks without content
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 10.2k
- Forks
- 772
- Ø Merge
- 3 T. 11 Std.
- Gemergte PRs (30 T.)
- 17
Beschreibung
Is your feature request related to a problem? Please describe.
The user may want to select a range of blocks, even if they do not contain content (e.g. image blocks).
For instance, the user may wish to delete all of those blocks at the same time. However, this is only possible if the start and end of the selection are blocks with content. In some edge cases, e.g. when using "Ctrl-A" on a document where the first block does not contain content (e.g. an image block), no selection is made, so e.g. "Ctrl-A" + "Ctrl-C", "Ctrl-A" + "Backspace" etc. do not work.
I tried to handle this manually but editor.setSelection requires that both start and end blocks are content blocks.
Describe the solution you'd like
Ideally, it would be nice if editor.setSelection supports all block types. But I'm not sure how well this would work with TipTap so some custom logic to track the selected nodes may be necessary.
I'm happy to look into this more if someone could point me in the right direction :)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Start at the editor.setSelection entry point and trace how selections are represented through the TipTap integration, especially for Ctrl-A. Determine how ranges can include blocks without content, then verify that selecting image or other empty blocks enables Ctrl-C and Backspace across the range.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100