CkEditor5 Stylesheet

Created on 15 May 2024, 6 months ago
Updated 21 June 2024, 5 months ago

Problem/Motivation

If you build the ckeditor5 stylesheet with vite, the output can't be used in the themes library, because it is referenced in the
.info.yml and injected in a hook.

Proposed resolution

Add a hook to modify the library information (e.g. by using another configuration value like ckeditor5-stylesheets-vite)

https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckedito...

Feature request
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @coffeemakr
  • 🇧🇪Belgium kubrick

    I worked around this in my vite.config.js.

        build: {
          outDir: "dist",
          manifest: true,
          rollupOptions: {
            input: [
              "src/scss/main.scss",
              "src/scss/ckeditor.scss",
              "src/js/*.js",
              "components/**/*.js",
              "components/**/*.scss",
            ],
            output: {
              assetFileNames: (assetInfo) => {
                // dont hash the ckeditor css
                if (assetInfo.name.match(/ckeditor\.css/)) {
                  return `assets/ckeditor.css`;
                }
    
                return `assets/[name].[hash].[ext]`;
              },
            },
          },
        },
    
Production build 0.71.5 2024