Commit 88565cc
feat: File blocks (#731)
* WIP file blocks
* Refactored API for extending file block previews
* Added `parse`/`toExternalHTML` to vanilla file block API
* Added `parse`/`toExternalHTML` to React file block API
* Fixed issues from merge
* Added audio/video file extensions, file UI buttons, and code improvements
* wip
* update formatting toolbar buttons
* Added `parse` & `toExternalHTML`
* Moved `parse` & `toExternalHTML` for file block
* wip
* Finished core refactor
* Refactored react package
* small improvements
* Updated CSS
* fix build
* Updated examples
* Implemented PR feedback
* Implemented PR feedback
* Fixed issues with `toExternalHTML`
* Updated core unit tests
* Updated React unit tests
* Fixed build
* small fixes
* fix build
* Updated PW tests
* Fixed PW tests
* small cleanup
* small fixes + add accept for file uploads
* Small fix to buttons & PDF example
* fix dictionary
* Updated locales
* Updated test screenshots
* Reverted test editor changes
* Updated snapshots
* Updated snapshots
* Changed how focus is set in toolbar buttons
* tmp fix for resetting fileId
* Simplified React unit tests
* Small CSS fix
* Removed text alignment from default file block
* Updated unit test snapshots
* Updated PW tests
---------
Co-authored-by: yousefed <yousefdardiry@gmail.com>1 parent 78864ee commit 88565cc
File tree
252 files changed
+5437
-1255
lines changed- docs
- pages/docs
- advanced
- editor-basics
- examples
- 01-basic
- 03-all-blocks
- testing
- 02-ui-components
- 01-ui-elements-remove
- 02-formatting-toolbar-buttons
- 03-formatting-toolbar-block-type-items
- 08-custom-ui
- 05-custom-schema
- 01-alert-block
- 03-font-style
- 04-pdf-file-block
- packages
- ariakit/src
- panel
- core/src
- api
- exporters
- html/__snapshots__
- file
- basic
- button
- nested
- noCaption
- noName
- image
- basic
- button
- nested
- noCaption
- noName
- noPreview
- simpleFile
- basic
- button
- nested
- simpleImage
- basic
- button
- nested
- noCaption
- noName
- noPreview
- markdown/__snapshots__
- file
- basic
- button
- nested
- noCaption
- noName
- image
- basic
- button
- nested
- noCaption
- noName
- noPreview
- simpleFile
- basic
- button
- nested
- simpleImage
- basic
- button
- nested
- noCaption
- noName
- noPreview
- nodeConversions/__snapshots__
- parsers/html/__snapshots__/paste
- testUtil/cases
- blocks
- AudioBlockContent
- FileBlockContent
- ImageBlockContent
- VideoBlockContent
- editor
- extensions
- FilePanel
- SuggestionMenu
- i18n/locales
- pm-nodes
- schema/blocks
- util
- mantine
- src
- panel
- react
- src
- blocks
- AudioBlockContent
- FileBlockContent
- ImageBlockContent
- VideoBlockContent
- components
- FilePanel
- DefaultTabs
- FormattingToolbar
- DefaultButtons
- SuggestionMenu
- editor
- hooks
- schema
- test
- __snapshots__
- reactFile
- basic
- button
- nested
- noCaption
- noName
- reactImage
- basic
- button
- nested
- noCaption
- noName
- noPreview
- testCases
- shadcn/src
- panel
- playground
- src
- tests
- src/end-to-end
- ariakit/ariakit.test.ts-snapshots
- copypaste
- copypaste.test.ts-snapshots
- images
- images.test.ts-snapshots
- keyboardhandlers
- shadcn/shadcn.test.ts-snapshots
- textalignment
- theming/theming.test.ts-snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
252 files changed
+5437
-1255
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
| |||
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
63 | 87 | | |
64 | 88 | | |
65 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | | - | |
10 | 13 | | |
11 | | - | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
0 commit comments