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

385
Views
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 answers
Answer question

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 Report
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!