# Bug COMMS-572 - Pasting rich text into CKEditor crashes it

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-572

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Text editor / CKEditor5 |
| Target versions | 17.7.0 |
| Observed in versions | 16.6.0 |
| Sprint | Sprint 7 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.6.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Tom Hykel |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

###   

### Steps to reproduce

1.  Open a CKEditor, e.g., by adding an agenda to a meeting
    
2.  Take rich text and paste it **without** formatting (Ctrl/Cmd + Shift + V)
    
3.  Observe it is pasted correctly.
    
4.  Paste the same text **with** formatting (Ctrl/Cmd + V)
    
5.  Observe errors in the JS console. On production, it will show as flash error and prevent the page from functioning until reloading. This will result in loss of anything typed so far.
    

You can copy an [AppSignal error](https://appsignal.com/openproject-gmbh/sites/674718f1d2a5e4a7cb8b2298/exceptions/incidents/1317) (not only the code block, but also the message around it) to guarantee a crash.

### What is the buggy behavior?

*   Pasting text with (presumably) formatting leads to CKEditor crashing.
    

### What is the expected behavior?

1.  The text should be pasted
    
2.  The editor should not crash
    

### **Logs**

This is the console log from the video:

```text
[DEBUG] [ErrorReporter] Would queue message  captureException   
Array [ CKEditorError ]
 , but is not configured. debug_output.ts:19:31
Uncaught CKEditorError: can't access property "replace", e6.data is undefined
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-can't access property "replace", e6.data is undefined
    e4 converters.js:81
    fire emittermixin.js:145
    _convertItem upcastdispatcher.js:217
    _convertChildren upcastdispatcher.js:246
    convertChildren upcastdispatcher.js:150
    nd upcasthelpers.js:739
    fire emittermixin.js:145
    _convertItem upcastdispatcher.js:217
    _convertChildren upcastdispatcher.js:246
    convertChildren upcastdispatcher.js:150
    Td upcasthelpers.js:443
    fire emittermixin.js:145
```

### Screenshots and other files

[ckeditor\_crash.mov](https://community.openproject.org/attachments/916870/ckeditor_crash.mov)
