This is my code. I used ckeditor online builder. in editor everything shows corrects. but when i check the console. it's not generating html tags.
import React, { useRef, useState } from 'react';
import styled from 'styled-components';
import Editor from 'ckeditor5-custom-build/build/ckeditor';
import { CKEditor } from '@ckeditor/ckeditor5-react'
const Ckeditor = () => {
const [content, setContent] = useState("")
const handleCkEditor = (event, editor)=>{
const data = editor.getData()
console.log(data)
}
return (
<Container>
<CKEditor
editor={ Editor }
onReady={ editor => {
// You can store the "editor" and use when it is needed.
console.log( 'Editor is ready to use!', editor );
} }
onChange={handleCkEditor}
onBlur={ ( event, editor ) => {
console.log( 'Blur.', editor );
} }
onFocus={ ( event, editor ) => {
console.log( 'Focus.', editor );
} }
onInit={editor => {
window.editor = editor;
}}
/>
</Container>
)
}
export default Ckeditor