In CKEDITOR 4.0 it was very simple, disabling content filtering
config.allowedContent = true
I have been going throught the docs again and again for almost a week. It was clearly mentioned in the docs that CKEditor 5 implements a custom data model. 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.. I am still unsure how to implement a custom data model which supports all styles and tags.
I am using decoupled editor with react js like below
import React from "react";
import CKEditor from "@ckeditor/ckeditor5-react";
import DecoupledcEditor from "@ckeditor/ckeditor5-build-decoupled-document";
export default function App() {
return (
<div className="App">
<CKEditor
editor={DecoupledcEditor}
data={this.state.data}
onInit={(editor) => {
console.log("Editor is ready to use!");
console.log(editor.ui.getEditableElement());
editor.ui
.getEditableElement()
.parentElement.append(editor.ui.view.toolbar.element);
}}
onChange={this.handleChange}
config={{
allowedContent:true
}}
/>
</div>
);
}
Any help or a peice of code for a new plugin which will allow all html tags and styles would be really greatfull
Yes CKEditor5 is not straight forward. Assuming you are looking for options to explicitly configure editor. I have done in this way,