3
I’m with a comments plugin for WordPress
who’s in a little trouble.
It works that way:
Is a <div>
that works as if it were a <textarea>
, only because it works like this, when the person wants to type a comment and she gives a "enter"
to break the line and then send the comment, the comment arrives without breaking line, it arrives as if the person has not given a break.
What the HTML code looks like:
<div class="commentator-textarea" placeholder="Junte-se" contenteditable=""></div>
Imagery:
Comment example: As it is after commented:
Is there any solution to this?
If I comment and break the line using Vou quebrar a<br>linha
it works.
After commented is:
I’m gonna break the
line
From what I’ve seen, the attribute
contenteditable
uses tags<br>
for line breaking, so theoretically it should work. You have to see how the comment code is coming in PHP. Sometimes Javascript may be taking the automatically generated tags and this is why it is going wrong.– Kazzkiq
@Kazzkiq
<br>
in the comment. .– Alexandre Lopes
Whenever Voce submits the text to the server replace the '<br/>' with ' n'
– Roger Barretto