CKEditor5 with Tailwind CSS
Jeon

Jeon @somidad

About: I write lessons learned through trial and error. Hope these are useful to you.

Joined:
May 26, 2023

CKEditor5 with Tailwind CSS

Publish Date: May 8
0 0

Unless doing something, Tailwind CSS 'clears' styles of CKEditor. To style CKEditor properly, do the followings:

  1. Install @tailwindcss/typography
npm install @tailwindcss/typography
Enter fullscreen mode Exit fullscreen mode
  1. Wrap the CKEditor component with prose class
<div className="prose max-w-full">
  <CKEditor {...editorProps} />
</div>
Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment