Skip to content

Commit 402e729

Browse files
committed
cleanup of the OpenProjectWorkPackageBlock
This commit separates concerns to allow these extensions to be developed further. - Components folder with actual react components for BlockNote - hooks folder with reusable hooks - services folder with API calls and API related code
1 parent 615a8d6 commit 402e729

19 files changed

+529
-1721
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ lerna-debug.log*
99

1010
node_modules
1111
dist-ssr
12+
dist
1213
*.local
1314

1415
# Editor directories and files
@@ -23,4 +24,4 @@ dist-ssr
2324
*.sw?
2425

2526
# build things
26-
op-blocknote-extensions-*
27+
op-blocknote-extensions-*

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,26 @@ Include the following entry to your _package.json_.
1414

1515
### Implementation
1616

17-
First setup a blocknote schema with additional blocks offered by this library...
17+
First thing is to initialize the library configuration...
18+
19+
```js
20+
initOpenProjectApi({ baseUrl: "https://my.openproject.url" });
21+
```
22+
23+
... then setup a blocknote schema with additional blocks offered by this library...
1824

1925
```jsx
2026
const schema = BlockNoteSchema.create({
2127
blockSpecs: {
2228
...defaultBlockSpecs,
23-
openProjectWorkPackage: openProjectWorkPackageBlockSpec,
24-
dummy: dummyBlockSpec,
29+
...defaultOpenProjectBlockSpecs,
2530
},
2631
});
2732
const editor = useCreateBlockNote({ schema });
2833
type EditorType = typeof editor;
2934
```
3035

31-
... setup slash menus ...
36+
... same for slash menus ...
3237

3338
```jsx
3439
const getCustomSlashMenuItems = (editor: EditorType) => {
@@ -39,7 +44,7 @@ First setup a blocknote schema with additional blocks offered by this library...
3944
};
4045
```
4146

42-
And include them all in a BlockNote instance
47+
... and include them all in a BlockNote instance
4348

4449
```jsx
4550
return (

dist/DummyComponent.d.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

dist/OpenProjectWorkPackageBlock.d.ts

Lines changed: 0 additions & 121 deletions
This file was deleted.

dist/helpers.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/index.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)