Peter Davenport
asked 7 years ago

I’m trying to get some styling done on the comments areas of my installation of DWQA. I found that in the comments, paragraph tags are not added. It makes it a little bit harder to style this way and lends itself only to short comments. Longer comments get run together because there is no paragraphing.
As part of this support request, I’m going to add a long comment to this question to illustrate it. I want to get some separation between paragraphs but am not able to.

Peter Davenport
replied 7 years ago

This comment has four paragraphs it.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed gravida quam libero, a pharetra magna rutrum quis. Nulla aliquet blandit ultrices. Curabitur convallis pharetra lectus nec egestas. Morbi eget malesuada ipsum.
Maecenas sit amet est faucibus velit ultricies sagittis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a lobortis velit, non hendrerit sapien. Nam quis venenatis metus. Curabitur odio massa, interdum sed tellus eget, ultricies consequat arcu.
Vestibulum arcu odio, dictum quis malesuada id, viverra non tellus. Nullam pharetra lectus sed felis egestas cursus. Nam fringilla tortor sed mauris lobortis molestie. Sed tellus lectus, sagittis tempor ipsum eget, hendrerit condimentum ligula.
Quisque non ornare velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec libero sem, faucibus ut convallis eget, congue id mauris. Ut sed libero tristique urna posuere mattis in eget nisi. Donec ac lacus consectetur, vulputate turpis in, commodo arcu. Aenean pharetra feugiat orci eget ornare. Nam sed imperdiet ligula, eu posuere augue. Aenean adipiscing justo vitae odio congue bibendum. Interdum et malesuada fames ac ante ipsum primis in faucibus.

1 Answers
DominicStaff
answered 7 years ago

Hi,
Apologies for the delay in replying to you,
You can find file in directory: your_domain\wp-content\plugins\dw-question-answer\inc\action.php
line 975
Replace the following code:

'comment_content' => isset( $_POST['content'] ) ? wp_kses_data( $_POST['content'] ) : '',

With new code:

'comment_content' => isset( $_POST['content'] ) ? nl2br($_POST['content']):'',

Paragraph of your comment will have line break like you want.
Hope this helps ! 

Alexandru Bodeanu
replied 6 years ago

Hi, how about if we want the text to take into consideration html tags? If I write text, it displays as is, it does not display bold text. Thanks 🙂

Dominic Staff
replied 6 years ago

Unfortunately, our plugin does not support this issue. At the moment, you just possible use the button on the mce-tinymce toolbar. See the screeshot: http://prntscr.com/5y1tch

Powered by DW Question & Answer Pro