Commit 2c8eea3
feat: Custom Blocks (#191)
* simplify formattingtoolbar
* Fixed React component types and added customizable formatting toolbar factory
* Finished formatting toolbar customization with old props
* Changed formatting toolbar props to use BlockNoteEditor
* Fixed text alignment with basic selection object
* Fixed block nesting tests
* Removed multiple block shorthand for updateBlock
* Added comments
* Added basic mouse cursor position
* Added drag handle menu customization API
* Copied changes from PR and minor improvements
* Table block test
* wip: custom blocks typing and API
* add comments
* fix nodeConversions, add schema
* comments
* Implemented renderHTML and parseHTML for createCustomBlock
* Temp changes
* Mostly implemented stricter typing for custom blocks
* Cleanup & fixed build issues
* Fixed useBlockNote and improved some typing
* Implemented PR feedback
* Minor changes
* Made custom blocks use node views
* Created custom example and setup component testing
* Changed custom block `renderHTML` implementation
* Changed custom block `renderHTML` implementation
* Changed custom block testing setup and added custom block examples
* Slightly changed `blockConfig.render` type
* Fixed merge issues
* custom blocks react poc
* Added internal custom block copy/paste tests
* Small fix
* Added external custom block copy/paste tests
* Added expected serialized HTML for example custom blocks
* Updated playwright scripts
* Updated component tests and added serializer extension
* Updated React custom block API
* Reverted `App.tsx`
* Fixed `test:updateSnaps` script
* Added external copypaste snapshots
* Fixed failing tests
* Copy/paste tests are now skipped for WebKit
* Removed old `console.log`s
* Small change to `test-ct` script
* Removed image block from `defaultBlocks.ts`
* Updated component tests & snapshots
* General cleanup
* Updated firefox colors snapshot
* remove unnecessary generics for slash menu items
* fix types
* hack around TextAlignButton types
* Custom blocks example typing improvements (#202)
* improve typings
* add tests for types
---------
Co-authored-by: Matthew Lipski <matthewlipski@gmail.com>
* Implemented most PR feedback
* Implemented most PR feedback
* Minor fixes to custom blocks
* Custom blocks docs (#217)
* Fixed custom block placeholders, formatting toolbar, and sizing
* Small styling changes
* Made text align button not show up when selected block/s doesn't/don't support the prop
* Updated docs
* Finished 1st draft custom block docs and demo
* Added type arguments in custom block docs & minor changes
* Implemented PR feedback
* Updated unit tests
* simplify docs
* package lock update
* add comment
* retreat, fallback slash command to "any"
* update packages incl prosemirror-view (#223)
* update packages incl prosemirror-view
* fix build
* fix ReactAlert + add logs
---------
Co-authored-by: yousefed <yousefdardiry@gmail.com>1 parent 72103bd commit 2c8eea3
File tree
132 files changed
+9077
-1871
lines changed- examples
- editor
- vanilla
- src/ui
- packages
- core
- src
- api
- blockManipulation
- formatConversions
- nodeConversions
- extensions
- Blocks
- api
- nodes
- BlockContent
- HeadingBlockContent
- ListItemBlockContent
- BulletListItemBlockContent
- NumberedListItemBlockContent
- ParagraphBlockContent
- DraggableBlocks
- FormattingToolbar
- Placeholder
- SlashMenu
- react
- src
- BlockSideMenu
- components
- DefaultButtons
- FormattingToolbar
- components
- DefaultButtons
- DefaultDropdowns
- SlashMenu
- components
- hooks
- website/docs/docs
- playwright
- tests
- component
- snapshots
- copypaste-external.spec.tsx-snapshots
- copypaste-internal.spec.tsx-snapshots
- end-to-end
- copypaste
- dragdrop
- keyboardhandlers
- setup
- utils
- components
- customblocks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
132 files changed
+9077
-1871
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
21 | | - | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
0 commit comments