Page 1 of 1

Handling Paragraphs

Posted: Thu Mar 16, 2023 6:21 am
by aleigh24
Hi there,

I'm sure there's a way to deal with this, but I just can't find an answer...

How do I turn off paragraphing and only have RichViewEdit insert a line break when Enter is hit. Basically, make the editor do a Shift-Enter when Enter is hit. The issue is, when I export to HTML, the outputted document appears with large double spaces because P tags are being inserted throughout it.

Regards,

Andrew

Re: Handling Paragraphs

Posted: Thu Mar 16, 2023 9:28 am
by Sergey Tkachenko
Sorry, there is no option to add line breaks instead of paragraph breaks on Enter.
But there is an option to save <div> instead of <p> for paragraph. Browsers do not add spacing to <div> by default.
As I understand, you save a simplified version of HTML (which uses formatting tags instead of CSS), otherwise TRichView would save paragraph spacing to HTML.
In this case, assign

Code: Select all

RichViewSavePInHTML = False;
RichViewSavePInHTML is a global variable defined in CRVData unit.

Re: Handling Paragraphs

Posted: Fri Mar 17, 2023 5:11 am
by aleigh24
Fantastic! That did the trick. Thanks so much Sergey.