Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
cuando se cambia el estado, ckeditor5 se representa por duplicado en reaccionar

Actualmente, estoy tratando de crear una función de encendido/apagado para que aparezca o desaparezca Ckeditor5

debajo de mi código

 import { Box, Button, styled, Typography } from "@mui/material"; import React from "react"; import { CKEditor } from "@ckeditor/ckeditor5-react"; import ClassicEditor from "@ckeditor/ckeditor5-build-classic"; const Description = ({ description }) => { const [isEdit, setIsEdit] = React.useState(false); const handlerOnOff = () => { setIsEdit((prev) => !prev); }; return ( <Root> <Box> <Typography component="span">Description</Typography> <Button onClick={handlerOnOff}>Edit</Button> </Box> <Box> {isEdit ? ( <div> <CKEditor config={{ toolbar: [ "heading", "|", "bold", "italic", "bulletedList", "numberedList", "blockQuote" ] }} data={description} editor={ClassicEditor} /> </div> ) : ( <>{description}</> )} </Box> </Root> ); }; const Root = styled("div")(({ theme }) => ({ marginBottom: "60px", "& .ck-content": { minHeight: "200px" } })); export default Description;

y codesandbox https://codesandbox.io/embed/suspicious-mahavira-eoeip1?fontsize=14&hidenavigation=1&theme=dark

cuando se hace clic en el botón llamado Editar y se cambia el verdadero nombre del estado esEditar, CKeditor se representa por duplicado

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!