Problem/Motivation
When adding a new page in Drupal using CKEditor, long text without spaces (such as a long URL or continuous string) causes the CKEditor Text component to break, resulting in layout issues where the content overflows or the text is improperly formatted.
Steps to reproduce
- Log in to your Drupal website.
- Go to the admin interface and create a new page (Content > Add content > Basic page).
- In the CKEditor text area, input a long string without any spaces (e.g., a long URL or continuous text).
- Save the page and preview it.
- Observe that the text breaks or overflows the content area, causing layout issues.
Proposed resolution
Apply word-break: break-word to the relevant elements to ensure proper text wrapping.
.ck-focused,
.ck-blurred,
.ck-source-editing-area {
word-break: break-word !important;
}
Remaining tasks
User interface changes
Before:
After: