• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

193
Vistas
Why is the p (paragraph) tag removed when all text is removed from the field?

I have multiple "CKEditor" editors on the same page. And now I observe strange behavior.

For example, I am initializing CKEditor to the p tag. And this works:

enter image description here

That is, I delete the text, but the first p tag of this kind is always kept:

<p data-placeholder="Type some text...">...</p>

But the documentation always contains this example:

<div id="editor"></div>

I change the p tag to div and I get this:

enter image description here

Above, when deleting text, this code is removed:

<p data-placeholder="Type some text...">...</p>

But if remove the focus from the field, then the tag p appears again:

enter image description here

Has anyone encountered similar behavior?

almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I'm using Vue. And I used v-html to render the original values. That was the problem. I fixed the problem using the setData method from CKEditor.

almost 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda