Skip to content

fix(ckeditor): WYSWIYGs broken (because race condition) - #1164

Merged
wesleyboar merged 1 commit into
mainfrom
fix/ckeditor-pastefromgdocs-customconfig
May 28, 2026
Merged

fix(ckeditor): WYSWIYGs broken (because race condition)#1164
wesleyboar merged 1 commit into
mainfrom
fix/ckeditor-pastefromgdocs-customconfig

Conversation

@wesleyboar

@wesleyboar wesleyboar commented May 28, 2026

Copy link
Copy Markdown
Member

Overview

Fixes CKEditor failing to open on remote servers after #1161.

The pastefromgdocs plugin registered via extraPlugins was returning 404 because addExternal (which redirects CKEditor to the CDN) was placed in the stylesSet file. That file loads during editor initialization, after extraPlugins are already resolved — so the redirect never took effect on prod/pre-prod.

Moving addExternal to a dedicated customConfig file fixes this: CKEditor loads customConfig first, before plugin resolution.

Related

Changes

  • added ckeditor.config.js — new CKEditor customConfig file; holds addExternal for CDN plugin
  • updated djangocms_plugins.py — register customConfig
  • deleted addExternal from ckeditor.wysiwyg.js (wrong timing; now in config file)

Testing

  1. Deploy to pre-prod.
  2. Open any page in edit mode and open a text plugin (WYSIWYG).
  3. Verify CKEditor opens without console errors about pastefromgdocs.
  4. Paste content from Google Docs and verify bold/italic paste behavior still works.

UI

works.on.remote.server.mov

Made with Cursor

stylesSet loads during editor init, after extraPlugins are resolved,
so addExternal had no effect on remote servers. customConfig loads
first, before plugin resolution, which is the correct place for it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@wesleyboar wesleyboar changed the title fix(ckeditor): use customConfig so addExternal runs before plugins load fix(ckeditor): WYSWIYGs broken (because race condition) May 28, 2026
@wesleyboar
wesleyboar merged commit 7766978 into main May 28, 2026
@wesleyboar
wesleyboar deleted the fix/ckeditor-pastefromgdocs-customconfig branch May 28, 2026 02:04
wesleyboar added a commit that referenced this pull request May 28, 2026
## Overview

Moves the Google Docs paste handler (bold/italic span →
`<strong>`/`<em>`) from `ckeditor.wysiwyg.js` into `ckeditor.config.js`.
The wysiwyg file is for style definitions only; JS behavior belongs in
the config file.

## Related

- follow-up to #1164

## Changes

- **moved** paste handler from `ckeditor.wysiwyg.js` to
`ckeditor.config.js`

## Testing

1. Deploy with #1164 merged.
2. Open a text plugin (WYSIWYG) in edit mode.
3. Paste content from Google Docs with bold and italic text.
4. Verify bold renders as `<strong>` and italic as `<em>`.

## UI


https://github.com/user-attachments/assets/73825a6e-6a48-4ddf-b951-c6f96cd168e5

---

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant