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.

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.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)

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
Humans are natural problem solvers and we're good enough at it that we've survived over the centuries and become the dominant species of the planet. Because we're so good at it, we sometimes become problem seekers too–looking for problems we can solve. Those who most successfully accomplish their goals are the problem eliminators. Let's talk about the distinction between solving and eliminating problems with examples from inside and outside the coding world.
Jotai Atoms Are Just Functions
React Day Berlin 2022React Day Berlin 2022
22 min
Jotai Atoms Are Just Functions
Top Content
Jotai is a state management library. We have been developing it primarily for React, but it's conceptually not tied to React. It this talk, we will see how Jotai atoms work and learn about the mental model we should have. Atoms are framework-agnostic abstraction to represent states, and they are basically just functions. Understanding the atom abstraction will help designing and implementing states in your applications with Jotai
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Let’s face it: technical debt is inevitable and rewriting your code every 6 months is not an option. Refactoring is a complex topic that doesn't have a one-size-fits-all solution. Frontend applications are particularly sensitive because of frequent requirements and user flows changes. New abstractions, updated patterns and cleaning up those old functions - it all sounds great on paper, but it often fails in practice: todos accumulate, tickets end up rotting in the backlog and legacy code crops up in every corner of your codebase. So a process of continuous refactoring is the only weapon you have against tech debt.In the past three years, I’ve been exploring different strategies and processes for refactoring code. In this talk I will describe the key components of a framework for tackling refactoring and I will share some of the learnings accumulated along the way. Hopefully, this will help you in your quest of improving the code quality of your codebases.

Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
As developers, we spend much of our time debugging apps - often code we didn't even write. Sadly, few developers have ever been taught how to approach debugging - it's something most of us learn through painful experience.  The good news is you _can_ learn how to debug effectively, and there's several key techniques and tools you can use for debugging JS and React apps.
Fighting Technical Debt With Continuous Refactoring
React Day Berlin 2022React Day Berlin 2022
29 min
Fighting Technical Debt With Continuous Refactoring
Top Content
Let’s face it: technical debt is inevitable and rewriting your code every 6 months is not an option. Refactoring is a complex topic that doesn't have a one-size-fits-all solution. Frontend applications are particularly sensitive because of frequent requirements and user flows changes. New abstractions, updated patterns and cleaning up those old functions - it all sounds great on paper, but it often fails in practice: todos accumulate, tickets end up rotting in the backlog and legacy code crops up in every corner of your codebase. So a process of continuous refactoring is the only weapon you have against tech debt. In the past three years, I’ve been exploring different strategies and processes for refactoring code. In this talk I will describe the key components of a framework for tackling refactoring and I will share some of the learnings accumulated along the way. Hopefully, this will help you in your quest of improving the code quality of your codebases.
The Epic Stack
React Summit US 2023React Summit US 2023
21 min
The Epic Stack
Top Content
Modern web development is fantastic. There are so many great tools available! Modern web development is exhausting. There are so many great tools available! Each of these sentiments is true. What's great is that most of the time, it's hard to make a choice that is wrong. Seriously. The trade-offs of most of the frameworks and tools you could use to build your application fit within the constraints of the vast majority of apps. Despite this, engineers consistently struggle with analysis paralysis.Let's talk about this, and a solution I am working on for it.