Commit 503c796
feat(core): source-with-preview, syntax highlighting & exporter images
Core primitives that the math and diagram blocks are built on.
- De-duplicate and order extensions by key in `ExtensionManager`, and stop
`editor.getExtension` from erasing extension instance types.
- Make syntax highlighting a user-provided singleton extension; code blocks
and other blocks configure a shared highlighter instead of owning one.
- Add `SourceBlockWithPreview` / `SourceInlineContentWithPreview` extensions
and their React counterparts: a reusable source/preview block and inline
content pattern with popup editing, keyboard and selection handling.
- Support converting between plain and styled text in `updateBlock`, and add
inline content boundary editing.
- Give exporters a typed `ExportImage` contract and dictionary-backed i18n so
they never hardcode language strings.1 parent 99253c3 commit 503c796
195 files changed
Lines changed: 7888 additions & 1662 deletions
File tree
- examples
- 04-theming
- 06-code-block/src
- 07-custom-code-block
- src
- 05-interoperability
- 05-converting-blocks-to-pdf
- src
- 06-converting-blocks-to-docx
- src
- 07-converting-blocks-to-odt
- src
- 08-converting-blocks-to-react-email
- src
- 06-custom-schema/11-source-with-preview
- src
- 07-collaboration/14-suggestion-gallery
- src
- packages
- code-block/src
- core/src
- api
- blockManipulation/commands/updateBlock
- __snapshots__
- exporters/markdown
- nodeConversions
- blocks
- Code
- helpers
- extensions
- parse
- render
- toExternalHTML
- editor
- managers/ExtensionManager
- exporter
- extensions
- FormattingToolbar
- InlineContentBoundaryEdit
- SourceBlockWithPreview
- SourceInlineContentWithPreview
- SyntaxHighlighting
- tiptap-extensions/KeyboardShortcuts
- i18n/locales
- schema
- blocks
- inlineContent
- react/src
- blocks/SourceWithPreview
- block
- inlineContent
- schema
- xl-docx-exporter/src/docx
- defaultSchema
- xl-email-exporter/src/react-email
- __snapshots__
- defaultSchema
- xl-odt-exporter/src/odt
- __snapshots__
- basic
- withCustomOptions
- withMultiColumn
- defaultSchema
- util
- xl-pdf-exporter/src/pdf
- __snapshots__
- defaultSchema
- tests/src
- end-to-end
- ariakit/__screenshots__/ariakit.test.tsx
- exporters
- __screenshots__/exporterImages.test.tsx
- images
- __screenshots__/images.test.tsx
- screenshots
- __screenshots__/screenshotFull.test.tsx
- shadcn/__screenshots__/shadcn.test.tsx
- static
- theming/__screenshots__/theming.test.tsx
- y-prosemirror/__screenshots__/propChanges.test.tsx
- unit
- core
- clipboard/copy/__snapshots__/text
- html
- plain
- formatConversion
- exportParseEquality/__snapshots__/markdown/markdown
- export/__snapshots__
- blocknoteHTML
- codeBlock
- complex
- html
- codeBlock
- complex
- markdown/codeBlock
- nodes/codeBlock
- parse/__snapshots__
- html
- markdown
- schema/__snapshots__
- react
- clipboard
- copyPasteEquality
- copy
- formatConversion
- exportParseEquality
- export
- __snapshots__/markdown/codeBlock
- parse
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| 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 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
9 | 25 | | |
10 | 26 | | |
11 | 27 | | |
| 28 | + | |
12 | 29 | | |
13 | 30 | | |
14 | 31 | | |
| |||
27 | 44 | | |
28 | 45 | | |
29 | 46 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
Lines changed: 60 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| |||
330 | 349 | | |
331 | 350 | | |
332 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
333 | 377 | | |
334 | 378 | | |
335 | 379 | | |
| |||
402 | 446 | | |
403 | 447 | | |
404 | 448 | | |
405 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
406 | 464 | | |
407 | 465 | | |
408 | 466 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
Lines changed: 62 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
| |||
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
35 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
| |||
324 | 343 | | |
325 | 344 | | |
326 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
327 | 371 | | |
328 | 372 | | |
329 | 373 | | |
| |||
396 | 440 | | |
397 | 441 | | |
398 | 442 | | |
399 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
400 | 460 | | |
401 | 461 | | |
402 | 462 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
0 commit comments