Challenge 2: Unleash the power of Typescript
Learn how to use CKEditor with these hands on challenges!
Challenge
Challenge 2: Unleash the power of Typescript
Objective:
- Use Typescript to check CKEditor setup esp. editor config
Steps to Complete:
- Head over to the starter project you built in the “Use Builder to create a starter project” challenge 1
- [Install the dependencies] Install
typescriptand@types/node - [Generate tsconfig.json] Generate default tsconfig (
npx tsc --init) - [Rename js to ts] Rename all js files to ts files (main.js and vite.config.js)
- [Link proper ts file from index.html]
- [Check dev server] Test out whether everything works
npm startand openinghttp://localhost:5173/index.html - [Check types] Validate the typescript
npx tsc --noEmitand fix all of the errors
Resource: You can get a more detailed breakdown of how to complete this challenge with this CKEditor GitHub Repository.