Thoughts on JIT scanning ckeditor

Created on 13 July 2023, over 1 year ago
Updated 8 September 2024, 3 months ago

I love how you've kept this setup very vanilla, it was useful to cross-reference my setup. I'm just leaving this as a piece of learning, and not really as a feature request.

One thing I've learnt is that JIT won't pick up my classes in WYSIWYG by default, it might be a interesting to add a basic src/ckeditor.css and then add this:

# tailwind.config.js
module.exports = {
  content: [
    "**/*.twig",
    "src/ckeditor.css",
   ...

Or otherwise i'm interested to see how you approach this situation.

Feature request
Status

Postponed: needs info

Version

5.0

Component

Code

Created by

🇦🇺Australia sime Melbourne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sime
  • 🇦🇺Australia sime Melbourne
  • Status changed to Postponed: needs info about 1 year ago
  • 🇬🇧United Kingdom opdavies Wales

    Hi @sime.

    Thanks for the suggestion, but what would you add to the src/ckeditor.css file to make it work with Tailwind?

    If it's custom styling for that theme, people can add that themselves when they create their theme.

    If it's something generic, it could be added to this starter kit, but I don't see how at the moment.

  • 🇦🇺Australia sime Melbourne

    I was using classes in CKEditor which were not being used in the theme. Tailwind never saw these classes and would not compile them. So I'm wondering how other people deal with this.

  • 🇩🇪Germany Andreas Schwarz

    Hello @sime,

    One solution is to work with Storybook and pre-design and test the styles outside of Drupal.
    So Tailwind can compile them and the Tailwind classes you want to make available to CKEditor are available.

Production build 0.71.5 2024