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

Refactor: clean blockcontainer #1137

Merged
merged 38 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
51f4216
extract updateBlockCommand
YousefED Oct 8, 2024
18ff213
Extracted remaining commands
matthewlipski Oct 8, 2024
de6f1ec
extract keyboard shortcuts
YousefED Oct 8, 2024
c3cea79
move directory
YousefED Oct 8, 2024
717301e
remove createblockcommand
YousefED Oct 8, 2024
9c32c92
Added merge/split tests
matthewlipski Oct 8, 2024
3fe50d5
Updated snapshots
matthewlipski Oct 9, 2024
6a0fda3
Added update block tests and unified test setup
matthewlipski Oct 9, 2024
df6dccc
Added test cases for reverting props
matthewlipski Oct 9, 2024
d4f206d
Added additional test cases for changing content type
matthewlipski Oct 9, 2024
5ac23d9
remove "nested" insert option
YousefED Oct 9, 2024
fc0010b
Split remaining commands & cleaned up
matthewlipski Oct 9, 2024
e392637
Added `getNearestBlockContainerPos`
matthewlipski Oct 10, 2024
5dd4afd
Refactored `getBlockInfoFromPos`
matthewlipski Oct 10, 2024
58016a9
Rewrote `splitBlockCommand`
matthewlipski Oct 12, 2024
6bcd81d
Added text cursor position tests
matthewlipski Oct 12, 2024
ab18dd4
Fixed lint issue
matthewlipski Oct 12, 2024
968b6fc
fix lint
YousefED Oct 13, 2024
89a86fb
Fixed `splitBlock` selection
matthewlipski Oct 14, 2024
adb0907
Merge remote-tracking branch 'origin/refactor/clean-blockcontainer' i…
matthewlipski Oct 14, 2024
ba11dd2
Small fix
matthewlipski Oct 14, 2024
dd572c3
Added unit tests to check selection setting
matthewlipski Oct 14, 2024
74a0cda
simplify splitblocks
YousefED Oct 14, 2024
690ec6a
Merge branch 'refactor/clean-blockcontainer' of github.com:TypeCellOS…
YousefED Oct 14, 2024
f57b0eb
Fixed selection in `splitBlock` tests
matthewlipski Oct 14, 2024
1236476
wip: deprecate getBlockInfoFromPos
YousefED Oct 14, 2024
7b17ded
finish cleanup
YousefED Oct 14, 2024
bf4635e
Fixed `mergeBlocks` edge cases
matthewlipski Oct 14, 2024
3f73033
fix build
YousefED Oct 15, 2024
0a50308
Merge branch 'refactor/clean-blockcontainer' of github.com:TypeCellOS…
YousefED Oct 15, 2024
9ae58f6
clean nodeconversions
YousefED Oct 15, 2024
80c8b46
Implemented PR feedback
matthewlipski Oct 15, 2024
1414e14
Finished review and remaining changes
matthewlipski Oct 15, 2024
f627732
Fixed bug in `insertOrUpdateBlock`
matthewlipski Oct 15, 2024
3d09350
Removed log
matthewlipski Oct 15, 2024
3d0e80e
Tiny changes
matthewlipski Oct 16, 2024
cb1e705
Merge pull request #1151 from TypeCellOS/refactor/clean-blockcontaine…
matthewlipski Oct 16, 2024
ab902c9
Fixed merge/delete behaviour on Backspace
matthewlipski Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/pages/docs/editor-api/manipulating-blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Use `insertBlocks` to insert new blocks into the document:
insertBlocks(
blocksToInsert: PartialBlock[],
referenceBlock: BlockIdentifier,
placement: "before" | "after" | "nested" = "before"
placement: "before" | "after" = "before"
): void;

// Usage
Expand All @@ -126,7 +126,7 @@ editor.insertBlocks([{type: "paragraph", content: "Hello World"}], referenceBloc

`referenceBlock:` An [identifier](/docs/editor-api/manipulating-blocks#block-identifiers) for an existing block, at which the new blocks should be inserted.

`placement:` Whether the blocks should be inserted just before, just after, or nested inside the `referenceBlock`. Inserts the blocks at the start of the existing block's children if `"nested"` is used.
`placement:` Whether the blocks should be inserted just before or just after the `referenceBlock`.

If a block's `id` is undefined, BlockNote generates one automatically.

Expand Down
Loading
Loading