Reputation: 13
In my Next.js (14.2.5) CMS app, I have used JoditEditor (version 4.1.2) for taking input of articles. When I paste text in the JoditEditor, NewLines character at the end of each paragraphs becomes two <br><br>
tag enclosed in <p>
and </p>
tag.
I need to change this behaviour of JoditEditor.
I need to have <p>
and </p>
tag for every paragraphs.
This is what is get now
<p>South Korea’s Yoon arrested after weeks of drama, tensions<br><br>South Korean authorities have arrested impeached President Yoon Suk Yeol, making him the first government head in the country to face such ordeal, ending weeks of standoff with his security team and supporters.<br><br>A previous arrest attempt failed on 3 January as Yoon’s security forces resisted police, and the Wednesday morning attempt succeeded only after clashes erupted between the rival state security forces, prompting the suspended president to hand him over.<br><br>Yoon faces charges of insurrection following an attempt to impose martial law that only lasted three hours on 3 December last year.</p>
This is what is expected
<p>South Korea’s Yoon arrested after weeks of drama, tensions</p>
<p>South Korean authorities have arrested impeached President Yoon Suk Yeol, making him the first government head in the country to face such ordeal, ending weeks of standoff with his security team and supporters.</p>
<p>A previous arrest attempt failed on 3 January as Yoon’s security forces resisted police, and the Wednesday morning attempt succeeded only after clashes erupted between the rival state security forces, prompting the suspended president to hand him over.</p>
<p>Yoon faces charges of insurrection following an attempt to impose martial law that only lasted three hours on 3 December last year.</p>
Here is the GitHub Gist of my TextEditor code: https://gist.github.com/deshtvbd/1f25a2554ba804a29e3a3712973f1223
Please help me solve the issue. Thank you in advance.
Upvotes: 0
Views: 20