An open API service indexing awesome lists of open source software.

https://github.com/albertfdp/ckeditor-html-issue

A minimal reproduction repository demonstrating a bug in CKEditor 5 where the editor crashes when using Remove Format on content with empty span elements.
https://github.com/albertfdp/ckeditor-html-issue

Last synced: 11 months ago
JSON representation

A minimal reproduction repository demonstrating a bug in CKEditor 5 where the editor crashes when using Remove Format on content with empty span elements.

Awesome Lists containing this project

README

          

# CKEditor HTML issue

This repository demonstrates a specific bug in CKEditor 5 when using the [General HTML Support](https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-support.html) plugin together with the [Remove formatting](https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html) feature.

You can see a video of the crash [here](https://drive.google.com/file/d/1mzhjdgmbDIH-PGqIcWDeWqbZdajCXJLh/view?usp=drive_link).

## Reproduction

The main issue occurs when:

1. The editor is configured to allow empty elements via the htmlSupport configuration
2. The content contains empty spans with class attributes
3. A user tries to use the "Remove Format" button from the toolbar
4. When these conditions are met, the editor crashes completely.

Example configuration for `htmlSupport`:

```js
htmlSupport: {
allowEmpty: ["span"],
allow: [{ name: "span", classes: true }],
},
```

Example content:

```html


Hello from CKEditor 5! here test


```

## Running the example

```sh
npm install
npm start
```