Skip to content

Commit 011985b

Browse files
committed
chore: additional changes
1 parent 09475fa commit 011985b

3 files changed

Lines changed: 60 additions & 62 deletions

File tree

examples/01-basic/01-minimal/src/App.tsx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ export default function App() {
99
const editor = useCreateBlockNote();
1010

1111
// After the editor is created, replace its document with a ProseMirror
12-
// structure that includes a suggestion-paragraph before the blockContainer's paragraph.
12+
// structure that includes a paragraph--atributed before the blockContainer's paragraph.
1313
useEffect(() => {
1414
// Use editor.transact to dispatch a ProseMirror transaction that replaces
1515
// the entire document content.
1616
editor.transact((tr) => {
1717
const { nodes } = editor.pmSchema;
1818

19-
// Build the suggestion-paragraph (shadow node for suggestions)
20-
const suggestionParagraph = nodes["suggestion-paragraph"].create(
19+
// Build the paragraph--atributed (shadow node for suggestions)
20+
const suggestionParagraph = nodes["paragraph--atributed"].create(
2121
{
2222
backgroundColor: "default",
2323
textAlignment: "left",
2424
textColor: "default",
2525
__suggestionData: "true",
2626
},
27-
[editor.pmSchema.text("Hello from suggestion-paragraph!")],
27+
[editor.pmSchema.text("Hello from paragraph--atributed!")],
2828
);
2929

3030
// Build the main blockContent paragraph
@@ -37,18 +37,18 @@ export default function App() {
3737
[editor.pmSchema.text("Hello from blockContainer!")],
3838
);
3939

40-
// Build the blockContainer with suggestion-paragraph before blockContent
40+
// Build the blockContainer with paragraph--atributed before blockContent
4141
//
4242
// Target structure:
4343
// doc
4444
// └─ blockGroup
4545
// └─ blockContainer
46-
// ├─ suggestion-paragraph("Hello from suggestion-paragraph!")
46+
// ├─ paragraph--atributed("Hello from paragraph--atributed!")
4747
// └─ paragraph("Hello from blockContainer!")
48-
const blockContainer1 = nodes.blockContainer.create(
49-
{ id: "block-1" },
50-
[suggestionParagraph, mainParagraph],
51-
);
48+
const blockContainer1 = nodes.blockContainer.create({ id: "block-1" }, [
49+
suggestionParagraph,
50+
mainParagraph,
51+
]);
5252

5353
// Second block: paragraph with trailing suggestion
5454
const mainParagraph2 = nodes.paragraph.create(
@@ -59,7 +59,7 @@ export default function App() {
5959
},
6060
[editor.pmSchema.text("Second block main content")],
6161
);
62-
const trailingSuggestion = nodes["suggestion-paragraph"].create(
62+
const trailingSuggestion = nodes["paragraph--atributed"].create(
6363
{
6464
backgroundColor: "default",
6565
textAlignment: "left",
@@ -68,10 +68,10 @@ export default function App() {
6868
},
6969
[editor.pmSchema.text("Trailing suggestion text")],
7070
);
71-
const blockContainer2 = nodes.blockContainer.create(
72-
{ id: "block-2" },
73-
[mainParagraph2, trailingSuggestion],
74-
);
71+
const blockContainer2 = nodes.blockContainer.create({ id: "block-2" }, [
72+
mainParagraph2,
73+
trailingSuggestion,
74+
]);
7575

7676
// Third block: plain paragraph (no suggestions)
7777
const mainParagraph3 = nodes.paragraph.create(
@@ -82,10 +82,9 @@ export default function App() {
8282
},
8383
[editor.pmSchema.text("Third block, no suggestions")],
8484
);
85-
const blockContainer3 = nodes.blockContainer.create(
86-
{ id: "block-3" },
87-
[mainParagraph3],
88-
);
85+
const blockContainer3 = nodes.blockContainer.create({ id: "block-3" }, [
86+
mainParagraph3,
87+
]);
8988

9089
const blockGroup = nodes.blockGroup.create(null, [
9190
blockContainer1,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"prebuild": "cp README.md packages/core/README.md && cp README.md packages/react/README.md",
3838
"prestart": "pnpm run build",
3939
"start": "serve playground/dist -c ../serve.json",
40-
"test": "#nx run-many --target=test --exclude=@blocknote/xl-ai",
40+
"test": "nx run-many --target=test --exclude=@blocknote/xl-ai",
4141
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,scss,md}\""
4242
},
4343
"overrides": {

0 commit comments

Comments
 (0)