Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

391
Visualizações
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?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

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.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda