-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
docs: Examples tab #322
docs: Examples tab #322
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General feedback; I think it would be nice if the examples can be bigger in terms of screen space for the editor / preview. More like https://vuejs.org/examples/#hello-world, but not sure if this is doable
editor.getTextCursorPosition().block, | ||
"after" | ||
); | ||
editor.setTextCursorPosition(editor.getTextCursorPosition().nextBlock!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be cleaner if we can use either the inserted block, or a return value from insertBlocks
to set the text cursor position. editor.getTextCursorPosition().nextBlock!
feels hacky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insertBlocks
can insert multiple blocks though, so it gets pretty cumbersome if e.g. the inserted blocks don't have IDs (which is usually the case), since you have to retrieve all the blocks again after you insert them, and can't do it by ID. So I think it's actually quite a bit of work to implement properly, especially since it would make sense to do the same thing for updateBlock
, replaceBlocks
, etc
This PR adds a new tab to the docs website for examples. Currently there are 3 basic examples and 3 advanced ones, though the organization might change and more will be added over time.