What’s new in Liveblocks: November 2024
We’ve released a new Tiptap package for Text Editor, a formatting toolbar for Comments, two different ways to prevent users losing unsychronized changes, and added room permission information to our dashboard.
This November we’ve expanded Text Editor and made some UX improvements.
- Official Tiptap support - New Text Editor package adding support for Tiptap.
- Formatting toolbar for Comments - Floating composer options for text styles.
- Preventing unsaved changes - Two new ways to stop unsynchronized changes.
- Permission info in dashboard - Check if your rooms are public or private.
Upgrade now
To use the latest features, update your packages with the following command.
If you were previously on Liveblocks 2.8 or below, make sure to follow our upgrade guides before updating.
Official Tiptap support
It’s now easier than ever to set up collaborative text documents using our new first-party package for Tiptap, a highly extensible rich-text editor. Text documents are fully-hosted and stored in our highly scalable realtime data store, meaning you just need to import our component to get started.
Our new Text Editor package makes it easy to create an advanced collaborative editor filled with all the features you’ve come to expect from Liveblocks, such as:
- Collaborative editing - Modify your document in realtime with others.
- Commenting - Annotate text and leave fully-featured threaded comments.
- Notifications - Display in-app notifications when users are mentioned.
- Instant loading - With offline support, no loading spinners are necessary.
- Multiple editors - Add a number of text editors to one document.
- AI suggestions - Learn how to add AI suggestions with our Novel example.
- Fully customizable - Integrate your editor perfectly into any design.
Learn more in our blog post
To learn more, make sure to read our previous blog post: Easy collaborative text editing with Liveblocks Tiptap.
Formatting toolbar for Comments
When composing comments, a contextual formatting toolbar is now shown when
selecting text, allowing your users to easily add styles to their comments. Four
styles are supported: Bold, italic,
~strikethrough~ and code
.
After updating to Liveblocks 2.13, the
Composer’s formatting
toolbar is enabled by default, but you can optionally disable it with
showFormattingControls={false}
.
Primitives toolbar
If you’ve built a custom composer using
Comments primitives, new
FloatingToolbar
and MarkToggle
components allow you to create a custom floating toolbar for your app.
Preventing unsaved changes
Liveblocks synchronizes very quickly, but occasionally, particularly when a user has a poor connection, they will close a browser tab before a change is saved. This could lead to issues such as a reaction not appearing on a comment, a word in a text editor not saving, a thread not being resolved.
To combat this, we’ve come up with two different solutions.
- useSyncStatus - A new way to show a synchronization badge in your UI.
- preventUnsavedChanges - Stop users closing tabs while unsynchronized.
useSyncStatus
It’s now easier than ever to create a synchronization badge in your app. We’ve added a new hook which checks every part of Liveblocks (Comments, Text Editor, Notifications, Storage, Yjs) and lets you know whether changes have been saved. You can use this information to create a status badge, such as the one in our Linear-like issue tracker example.
The new hook’s called
useSyncStatus
and it’s
just a few lines of code to create a badge.
Because Liveblocks syncs quickly and often, ordinarily the badge would flash a
lot. To account for this, we’ve added a smooth
option, which delays changes
between states, so your UI isn't distracting. We’re using this in the video
above.
preventUnsavedChanges
We’ve added a new option that prevent users from closing tabs with a dialog if there are any unsaved changes. Along with preventing unsynchronized changes in every part of Liveblocks, it additionally prevents users from closing the page when they’ve left unsubmitted text in a Composer.
To enable this feature, use the
preventUnsavedChanges
option in LiveblocksProvider
.
Permission info in dashboard
You can now quickly check if your rooms are public or private on our dashboard, and we’ve added a warning that lets you know if all your rooms are public, to let you know if you’re accidentally exposing your room data.
Why your rooms might be public
If you’re not creating rooms with our Node.js package or REST API, this means we’ve automatically creating rooms for you. Each room created automatically is set to have public permissions, which means that users don’t need authentication to access the room.
To only allow authenticated users, you can easily change permissions on a room, or create a room with private access right from the start.
Rooms are only automatically created if you’re using access token authentication, as ID tokens always require you to manually create rooms. Learn more about setting default room permissions with access tokens.
Upgrade
To use the latest features, update your packages with the following command.
If you were previously on Liveblocks 2.8 or below, make sure to follow our upgrade guides before updating.
Contributors
8 authors
Ready to get started?
Join developers who use Liveblocks to build world‑class collaborative experiences.