# Troubleshooting migration from CKEditor 4

This article describes some issues that you may encounter when migrating from CKEditor 4 to CKEditor 5.

<a id="why-does-the-editor-filter-out-my-content-styles-classes-elements-where-is-configallowedcontent-true">

## Why does the editor filter out my content (styles, classes, elements)? Where is `config.allowedContent = true`?

Unlike [CKEditor 4](https://ckeditor.com/ckeditor-4/), CKEditor 5 implements a custom [data model](../../framework/architecture/editing-engine.md). This means that every piece of content that is loaded into the editor needs to be converted to that model and then rendered back to the view.

Each kind of content must be handled by a dedicated plugin. For instance, the [`ckeditor5-basic-styles`](https://www.npmjs.com/package/@ckeditor/ckeditor5-basic-styles) package handles HTML elements such as `<b>`, `<i>`, `<u>`, etc. along with their representation in the model. The feature defines the two–way conversion between the HTML (view) and the editor model. Content that none of the enabled features recognizes is dropped.

There is no equivalent of `config.allowedContent = true`. To keep your content, consider the following options, starting with the least amount of work:

1. **Enable the feature that handles the markup.** Some content is dropped only because the matching plugin is missing from your setup. Refer to the [Migrating existing data](migration-from-ckeditor-4.md#migrating-existing-data) section of the migration guide for legacy markup that CKEditor 5 maps once the right plugins are loaded.
2. **Use the [General HTML Support](../../features/html/general-html-support.md) feature.** It preserves elements, classes, attributes, and styles that no feature covers, and it requires no code.
3. **Write a plugin.** For markup that needs actual editing behavior rather than preservation, implement the conversion yourself. Refer to the [Creating plugins](../../framework/architecture/plugins.md#creating-plugins) section.

<a id="what-happened-to-the-contentscss-file-how-do-i-style-the-content-of-the-editor">

## What happened to the `contents.css` file? How do I style the content of the editor?

There is no such thing as the `contents.css` file anymore. This is because in CKEditor 5 the features bring their own content styles, [provided via CSS files](../../getting-started/setup/content-styles.md).

<a id="where-are-the-editorinserthtml-and-editorinserttext-methods-how-to-insert-some-content">

## Where are the `editor.insertHtml()` and `editor.insertText()` methods? How to insert some content?

Refer to [this CKEditor 5 How-to question](../../framework/how-tos.md#how-to-insert-some-content-into-the-editor).

<a id="what-happened-to-the-global-windowckeditor-how-to-list-all-instances-of-the-editor">

## What happened to the global `window.CKEDITOR`? How to list all instances of the editor?

Refer to [this CKEditor 5 How-to question](../../framework/how-tos.md#how-to-list-all-instances-of-the-editor).

---

Full index of the CKEditor 5 documentation: [llms.txt](../../../llms.txt)
