Build a Collaborative Notion-Like Product in 2H

Rate this content
Bookmark

You have been tasked with creating a collaborative text editing feature within your company’s product. Something along the lines of Notion or Google Docs.


CK 5 is a feature-rich framework and ecosystem of ready-to-use features targeting a wide range of use cases. It offers a cloud infrastructure to support the real-time collaboration system needs. During this workshop, you will learn how to set up and integrate CK 5. We will go over the very basics of embedding the editor on a page, through configuration, to enabling real-time collaboration features. Key learnings: How to embed, set up, and configure CK 5 to best fit a document editing system supporting real-time collaboration.


Table of contents:

- Introduction to the CK 5 ecosystem.

- Introduction to a “Notion-like” project template.

- Embedding CK 5 on a page.

- Basic CK 5 configuration.

- Tuning up CK 5 for a specific use case.

- Enabling real-time editing features.

This workshop has been presented at JSNation 2023, check out the latest edition of this JavaScript Conference.

FAQ

Yes, CKEditor 5 supports real-time collaboration, allowing multiple users to edit the same document simultaneously. It also includes features like comments and track changes.

CKBox is an official adapter for CKEditor 5 that allows for easy image upload and management. It converts images to multiple file types and sizes, making them responsive and optimized for different devices.

CKEditor is a rich text editor that allows users to create and format content in a visual way, typically outputting HTML. It is highly extensible and can be implemented in any application that supports HTML, CSS, and JavaScript.

The key team members behind CKEditor 5 include Itek Soha, the technical product owner, Piotr Koszulinsky, the director of engineering, and Szymon, the project leader in collaboration features. Together, they have around 20 years of experience in building editors.

CKEditor 5 offers powerful text editing solutions, including real-time collaboration, rich text formatting, plugin-based architecture, and it is fully written in TypeScript. It also supports features like tables, images, and autosave.

Yes, CKEditor 5 is an open-source project licensed under the GPL license. The source code is available on GitHub.

CKEditor has been on the market for around 20 years. It started in 2003 as FCKEditor, was rebranded to CKEditor 3, then CKEditor 4 in 2012, and finally CKEditor 5 was released in 2018.

Yes, CKEditor 5 is highly extensible. If you miss some functionalities, you can use CKEditor as a framework and introduce new functionalities by yourself.

CKEditor 5 is fully written in TypeScript and can be implemented in any application that supports HTML, CSS, and JavaScript.

The purpose of the workshop is to teach participants how to build a collaborative Notion-like product using CKEditor 5 within two hours. The workshop covers configuring the editor, installing different plugins, and implementing features like real-time collaboration, autosave, tables, and images.

Witek Socha
Witek Socha
87 min
23 May, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Today's workshop focused on building a collaborative notion-like product using CK Editor 5. The workshop covered setting up the editor and configuring plugins, including features like bold, headings, lists, and links. Other topics included autosaving, undo/redo functionality, working with tables and images, implementing real-time collaboration and comments, and introducing experimental features like drag and drop. The workshop concluded with a discussion on the limitations of Notion and the potential for creating custom plugins with CK Editor 5.

1. Introduction to CK Editor 5

Short description:

Welcome everyone. Today we'll build a collaborative notion-like product using CK editor 5. CK editor is a rich text editor written in TypeScript. It's highly extensible and open source. The history of CK editor spans 20 years, starting from FCK editor to CK editor 5. We'll focus on configuring the editor and using existing plugins. We love Notion and aim to build something similar. Questions are welcome.

Welcome everyone. I'm extremely happy to be here. And today we will have around two hours of workshops and we'll try to build a collaborative notion-like product in two hours.

So before we start with coding, I will just flash a few slides here. So that the name, like, my name is Itek Soha and I'm the technical product owner at the CK editor 5 core team and together with me, with their cameras on, you can see Piotr Koszulinsky, he's the director of engineering, and Szymon, he's a project leader in the collaboration features, and they're joining as well. Together they have around 20 years of experience in building editors, so if you will have more advanced questions, I'm sure they will answer them right away.

So CK what, like, that's a pretty strange name for the product, but a CK editor is basically a rich text editor, right, so we have a editor, what you see is what you get, and basically you can create the content in a visual way and you will receive the content later on in the desired format. Usually it's HTML, so the editor itself is written fully in TypeScript right now. This is something new. We've just finished the rewrite to TypeScript. We'll be also using TypeScript today and editor itself could be implemented in any application that has HTML, CSM and JavaScript support, right. So the editor itself is also highly extensible. If you miss some functionalities can use the editor itself as a framework and introduce some functionalities by yourself. And it's an open source project. So if you would like, you can check on GitHub. We are there and the whole editor is licensed under the GPL license.

So the history is not that brief. The editor itself is on the market for around 20 years. And it started in 2003 as FCK editor, done by Federico. And then it was renamed as you can see, the FCK was not that good acronym to having the product. You can answer yourself why. But then it was rebranded to CK editor 3. Then in 2012, it was the CK editor 4 released. And there is a high chance you were actually using it somewhere. It was the main editor in the Drupal CMS, right? Then we had another product, which is basically a totally different product, CK editor 5 released in 2018. And as I said, totally different architecture, those two products actually were still on the market side by side. This is why you have this number of 4 and 5, but the CK editor 5 introduced more powerful text editing solutions like real-time collaboration that we'll try to use today. And in 2022, CK editor 5 was again included into the Drupal core as the main editor. Here you have some very cool logos of our products that use the CK editor 5. And our clients as well. This is the brief history and a few facts about the CK editor.

But what will we do today? And this is how AI imagines the wall of glues. What we'll mostly do today is gluing. We will glue different configurations of the editor just to receive a product that we would like to have. I'm saying gluing because we'll mostly spend time on configuring the editor, installing different plug-ins. We will not develop new features for the editor. This may be a topic for some future workshops. And also we have only two hours so we'll try to only use the plug-ins that are already there mostly but still having some fun with it. Small disclaimer. We love Notion. This is the Notion-like product. We actually use the Notion inside of the CK source company. So this is something that we value a lot and we really like this product and we'll try to build something similar. And if you have any questions, there's Simon here, there's Piotrek here. So feel free to ask. You can basically ask the questions on the chat. Is CK editor used inside Notion? No or not yet. We do not know, but it's not used right now. So if you'll have any questions, I will try to take a look at the chat. So feel free to ask anything.

2. Setting Up the Editor and the Product

Short description:

Welcome to the workshop! We'll set up the editor and the product as part of a story. You join a new company as a developer, and there's an onboarding project waiting for you. The product manager wants cool content creation features. We check the repo and find a message from the previous developer. The product uses Vite and CK5, written and read in TypeScript. It has a plugin-based architecture. We're treating it as a spike to increase user engagement.

Our host also said you can just ask and unmute yourself and we will try to answer. If you would like to code along, go ahead, I will be coding. We will try to set up the editor and the product, so if you would like to join, go ahead, and I will send a few details in a second and the whole workshop will be set up some kind of a story, right? So to have a real-life example of setting up the editor, this is going to be a real-life scenario that maybe some of you had similar experiences when you joined some companies.

So the story goes as follows. You basically joined a new company as a developer and there's an onboarding project waiting for you and the product manager cannot wait to tell you more about it. So I will be coding in Vim, right? So that's my editor of choice. But you can, if you want to code along, here is the link to the repo. Feel free to clone it and basically what you just need to do in the root of the repo, you just need to run one command. There is this meta directory here. You just need to get one script from there, called reset, and when you launch it, the index of the project will be set up to the start stage of what we are doing right now. If you would not like to code along, just watch what I will be doing. If you would like to join later on this reset script actually allows you to join later on. So our story will be cut to act. So for example, if you would like to join us in act five, if you will run this command, the index of your project will be reset to the code that we will get at the end of act four. So later on, if you would like to check different stages of this project, feel free to do that, but I will start from the start, at least from now. I hope I will not need to move myself to other acts by this command. Okay, so let's start it. And check the license, check the license, always check the license. That's true, if you do not want to have trouble with your legal department. Okay, so let's start our story. We, our PM is saying that we want to have cool content creation features to our app. Previous developers started working on something, check out what he created, right. So let's try to visit our repo. Let's see what we have here. So when we will check it, we have athlete, right, pre-tier, pretty standard stuff. We have readme. So let's check this out. And here we have a message from our previous developer that is not content with his product manager, I guess. But he sure is like, he prepared some skeleton for us, right. The product uses Vite. It's experimental setup on the CK5, but it works great. They are reading full in TypeScript and will be also writing in TypeScript. Plugin-based architecture, more on that in a second. And the message is about never trusting the PM. I'm not sure if that's true, we'll see. And good luck. And at the end you have the meta instructions how to set up this reset script if you would like to follow along. So here we have the readme. We also have the index HTML, right? With a few parts commented out. That's because we will just enable them later on. And yeah, that's the setup. Basically everything looks fine. We have the package.json as well, with a few packages, but not that many mostly dev packages, one CKEditor5 package. So we will not touch it right now. So with this setup, let's start. And we will basically go to the first act of our story. So you basically go to your PM, and you say that something is there, but not a lot. And the PM will tell you, like we want to increase user engagement. Let's create some awesome content. And we will treat it as a spike, right? It's gonna be a prototype.

Watch more workshops on topic

React, TypeScript, and TDD
React Advanced Conference 2021React Advanced Conference 2021
174 min
React, TypeScript, and TDD
Top Content
Featured WorkshopFree
Paul Everitt
Paul Everitt
ReactJS is wildly popular and thus wildly supported. TypeScript is increasingly popular, and thus increasingly supported.

The two together? Not as much. Given that they both change quickly, it's hard to find accurate learning materials.

React+TypeScript, with JetBrains IDEs? That three-part combination is the topic of this series. We'll show a little about a lot. Meaning, the key steps to getting productive, in the IDE, for React projects using TypeScript. Along the way we'll show test-driven development and emphasize tips-and-tricks in the IDE.
Web3 Workshop - Building Your First Dapp
React Advanced Conference 2021React Advanced Conference 2021
145 min
Web3 Workshop - Building Your First Dapp
Top Content
Featured WorkshopFree
Nader Dabit
Nader Dabit
In this workshop, you'll learn how to build your first full stack dapp on the Ethereum blockchain, reading and writing data to the network, and connecting a front end application to the contract you've deployed. By the end of the workshop, you'll understand how to set up a full stack development environment, run a local node, and interact with any smart contract using React, HardHat, and Ethers.js.
Remix Fundamentals
React Summit 2022React Summit 2022
136 min
Remix Fundamentals
Top Content
Featured WorkshopFree
Kent C. Dodds
Kent C. Dodds
Building modern web applications is riddled with complexity And that's only if you bother to deal with the problems
Tired of wiring up onSubmit to backend APIs and making sure your client-side cache stays up-to-date? Wouldn't it be cool to be able to use the global nature of CSS to your benefit, rather than find tools or conventions to avoid or work around it? And how would you like nested layouts with intelligent and performance optimized data management that just works™?
Remix solves some of these problems, and completely eliminates the rest. You don't even have to think about server cache management or global CSS namespace clashes. It's not that Remix has APIs to avoid these problems, they simply don't exist when you're using Remix. Oh, and you don't need that huge complex graphql client when you're using Remix. They've got you covered. Ready to build faster apps faster?
At the end of this workshop, you'll know how to:- Create Remix Routes- Style Remix applications- Load data in Remix loaders- Mutate data with forms and actions
Vue3: Modern Frontend App Development
Vue.js London Live 2021Vue.js London Live 2021
169 min
Vue3: Modern Frontend App Development
Top Content
Featured WorkshopFree
Mikhail Kuznetcov
Mikhail Kuznetcov
The Vue3 has been released in mid-2020. Besides many improvements and optimizations, the main feature of Vue3 brings is the Composition API – a new way to write and reuse reactive code. Let's learn more about how to use Composition API efficiently.

Besides core Vue3 features we'll explain examples of how to use popular libraries with Vue3.

Table of contents:
- Introduction to Vue3
- Composition API
- Core libraries
- Vue3 ecosystem

Prerequisites:
IDE of choice (Inellij or VSC) installed
Nodejs + NPM
Developing Dynamic Blogs with SvelteKit & Storyblok: A Hands-on Workshop
JSNation 2023JSNation 2023
174 min
Developing Dynamic Blogs with SvelteKit & Storyblok: A Hands-on Workshop
Top Content
Featured WorkshopFree
Alba Silvente Fuentes
Roberto Butti
2 authors
This SvelteKit workshop explores the integration of 3rd party services, such as Storyblok, in a SvelteKit project. Participants will learn how to create a SvelteKit project, leverage Svelte components, and connect to external APIs. The workshop covers important concepts including SSR, CSR, static site generation, and deploying the application using adapters. By the end of the workshop, attendees will have a solid understanding of building SvelteKit applications with API integrations and be prepared for deployment.
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Don't Solve Problems, Eliminate Them
React Advanced Conference 2021React Advanced Conference 2021
39 min
Don't Solve Problems, Eliminate Them
Top Content
Kent C. Dodds discusses the concept of problem elimination rather than just problem-solving. He introduces the idea of a problem tree and the importance of avoiding creating solutions prematurely. Kent uses examples like Tesla's electric engine and Remix framework to illustrate the benefits of problem elimination. He emphasizes the value of trade-offs and taking the easier path, as well as the need to constantly re-evaluate and change approaches to eliminate problems.
Jotai Atoms Are Just Functions
React Day Berlin 2022React Day Berlin 2022
22 min
Jotai Atoms Are Just Functions
Top Content
State management in React is a highly discussed topic with many libraries and solutions. Jotai is a new library based on atoms, which represent pieces of state. Atoms in Jotai are used to define state without holding values and can be used for global, semi-global, or local states. Jotai atoms are reusable definitions that are independent from React and can be used without React in an experimental library called Jotajsx.
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Today's Talk discusses the importance of managing technical debt through refactoring practices, prioritization, and planning. Successful refactoring requires establishing guidelines, maintaining an inventory, and implementing a process. Celebrating success and ensuring resilience are key to building a strong refactoring culture. Visibility, support, and transparent communication are crucial for addressing technical debt effectively. The team's responsibilities, operating style, and availability should be transparent to product managers.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
The Epic Stack
React Summit US 2023React Summit US 2023
21 min
The Epic Stack
Top Content
Watch video: The Epic Stack
This Talk introduces the Epic Stack, a project starter and reference for modern web development. It emphasizes that the choice of tools is not as important as we think and that any tool can be fine. The Epic Stack aims to provide a limited set of services and common use cases, with a focus on adaptability and ease of swapping out tools. It incorporates technologies like Remix, React, Fly to I.O, Grafana, and Sentry. The Epic Web Dev offers free materials and workshops to gain a solid understanding of the Epic Stack.