Skip to content

fix initialcontent and uniqueid - #289

Merged
matthewlipski merged 3 commits into
react-rearchitecturefrom
fix-initialcontent
Aug 1, 2023
Merged

matthewlipski merged 3 commits into
react-rearchitecturefrom
fix-initialcontent

Conversation

@YousefED

@YousefED YousefED commented Aug 1, 2023

Copy link
Copy Markdown
Collaborator

with this change we:

  • explicitly pass initial content of the editor, so that we can make sure the default paragraph has an id
  • disable uniqueId onCreate(). As this is disabled for collab anyway, I think it's cleaner to clear this. It also was causing issues with unit tests.
  • we don't need to call replaceBlocks in onCreate anymore 🎉

@YousefED
YousefED requested a review from matthewlipski August 1, 2023 12:02
@vercel

vercel Bot commented Aug 1, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview Aug 1, 2023 1:52pm

@matthewlipski
matthewlipski merged commit be406b7 into react-rearchitecture Aug 1, 2023
matthewlipski added a commit that referenced this pull request Aug 1, 2023
* test react components as children

* slashmenu

* Major refactor

* Exported plugin keys & cleaned up slash menu plugin

* Removed redundant type

* Commented out old factory & component wrapper

* Removed old files & fixed build

* Small cleanup

* Fixed some bugs in the slash and side menus

* Made menu & toolbar plugins load with the highest priority instead of the lowest

* Disabled strict mode

* Fixed a bug which caused plugin views to be created multiple times

* several fixes for react rearchitecture (#272)

* Major cleanup for menus & toolbars

* Major cleanup for menus & toolbars

* Cleaned up `useBlockNote`, menu & toolbar components

* Changed menu & toolbar APIs to work with the new rendering architecture

* Numerous changes:
- Menu extensions are now initialized on editor creation and expose listeners
- Cleaned up slash menu item creation and typing
- Fixed drag & drop causing errors when calling `getBlockInfoFromPos`

* Fixed menus being initialized early

* Fixed some deps

* Reverted some deps

* Added lint ignore annotations to deps

* Cleaned up slash menu and suggestion items

* Cleaned up `BlockNoteEditor`

* Revert "Cleaned up `BlockNoteEditor`"

This reverts commit 5409f8b.

* Minor changes

* Minor changes & update to formatting toolbar docs

* simplify ui elements (#288)

* simplify ui elements

* remove unused

* fix view

* Fixed build

* add onUpdate

* fix vanilla

* fix build

* allow props for blocknoteview

---------

Co-authored-by: Matthew Lipski <matthewlipski@gmail.com>

* Implemented PR feedback

* Implemented PR feedback

* Implemented PR feedback

* Implemented PR feedback

* Added docs & small tweaks

* Renamed remaining slashCommand references to slashMenuItems

* Implemented PR feedback

* Fixed lint warning

* fix initialcontent and uniqueid (#289)

* fix initialcontent and uniqueid

* fix

* Removed ready check in `BlockNoteView`

---------

Co-authored-by: Matthew Lipski <matthewlipski@gmail.com>

* Added pre-made components for side menu

* Added custom side menu docs

* Updated docs

* Updated unit tests & snapshots

* Updated `useBlockNote` deps

---------

Co-authored-by: yousefed <yousefdardiry@gmail.com>

This branch was successfully deployed

1 active deployment
Preview – blocknote-website — 27fafc5c Deployed Aug 1, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants