-
-
Notifications
You must be signed in to change notification settings - Fork 558
Custom blocks docs #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Custom blocks docs #217
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
YousefED
reviewed
May 30, 2023
packages/react/src/FormattingToolbar/components/DefaultButtons/TextAlignButton.tsx
Outdated
Show resolved
Hide resolved
YousefED
added a commit
that referenced
this pull request
May 31, 2023
* simplify formattingtoolbar * Fixed React component types and added customizable formatting toolbar factory * Finished formatting toolbar customization with old props * Changed formatting toolbar props to use BlockNoteEditor * Fixed text alignment with basic selection object * Fixed block nesting tests * Removed multiple block shorthand for updateBlock * Added comments * Added basic mouse cursor position * Added drag handle menu customization API * Copied changes from PR and minor improvements * Table block test * wip: custom blocks typing and API * add comments * fix nodeConversions, add schema * comments * Implemented renderHTML and parseHTML for createCustomBlock * Temp changes * Mostly implemented stricter typing for custom blocks * Cleanup & fixed build issues * Fixed useBlockNote and improved some typing * Implemented PR feedback * Minor changes * Made custom blocks use node views * Created custom example and setup component testing * Changed custom block `renderHTML` implementation * Changed custom block `renderHTML` implementation * Changed custom block testing setup and added custom block examples * Slightly changed `blockConfig.render` type * Fixed merge issues * custom blocks react poc * Added internal custom block copy/paste tests * Small fix * Added external custom block copy/paste tests * Added expected serialized HTML for example custom blocks * Updated playwright scripts * Updated component tests and added serializer extension * Updated React custom block API * Reverted `App.tsx` * Fixed `test:updateSnaps` script * Added external copypaste snapshots * Fixed failing tests * Copy/paste tests are now skipped for WebKit * Removed old `console.log`s * Small change to `test-ct` script * Removed image block from `defaultBlocks.ts` * Updated component tests & snapshots * General cleanup * Updated firefox colors snapshot * remove unnecessary generics for slash menu items * fix types * hack around TextAlignButton types * Custom blocks example typing improvements (#202) * improve typings * add tests for types --------- Co-authored-by: Matthew Lipski <[email protected]> * Implemented most PR feedback * Implemented most PR feedback * Minor fixes to custom blocks * Custom blocks docs (#217) * Fixed custom block placeholders, formatting toolbar, and sizing * Small styling changes * Made text align button not show up when selected block/s doesn't/don't support the prop * Updated docs * Finished 1st draft custom block docs and demo * Added type arguments in custom block docs & minor changes * Implemented PR feedback * Updated unit tests * simplify docs * package lock update * add comment * retreat, fallback slash command to "any" * update packages incl prosemirror-view (#223) * update packages incl prosemirror-view * fix build * fix ReactAlert + add logs --------- Co-authored-by: yousefed <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds documentation for custom blocks and fixes a few smaller issues with them. There are still a few things that need changing:
contentEditable="false"
on all elements except thecontentDOM
/InlineContent
and its ancestors (https://discuss.prosemirror.net/t/contenteditable-islands-prevents-selection/3938).createBlockSpec
manually? Not sure if this is something we want since we probably want to keep the ability to create BlockSpecs from scratch and add them to the schema.