WPCubed Product Support

Keep Next Paragraph, but allow paragraph break

When I insert a new paragraph as a "heading" I am trying to set its its properties so that the next paragraph does not become orphaned and g on to the next page. I am using using WPAT_ParKeepN

to achieve this, which it does. However, the next paragraph is now allowed to split and I cannot find any property to allow the net para to split over the page.

I am getting this result:

HEADING

Next paragraph text

Next paragraph text

Next paragraph text

---------------------------------------- Page break--------------------------

Another paragraph text

I am trying to achieve this:

HEADING

Next paragraph text

---------------------------------------- Page break--------------------------

Next paragraph text

Next paragraph text

Another paragraph text

Is this possible?

#1 ♥ 0
3.7k Views 2 users 1 ♥ read 1 min
wpsupport

Did you try to apply WPAT_ParKeep to the next paragraph?

#2 ♥ 0
wpsupport

Yes, the meaning is:

KeepN = keep with nextparagraph

Keep = keep paragraph on page (if possible)

var i : Integer;
WPRichText1.FormatOptions :=   WPRichText1.FormatOptions - [wpfIgnoreKeep, wpfIgnoreKeepN];
WPRichText1.InputString(#13);
WPRichText1.ActiveParagraph.ASet(WPAT_ParKeepN, 1);
WPRichText1.InputString('Heading' + #13 + 'Start ');
WPRichText1.ActiveParagraph.ASet(WPAT_ParKeep, 1);
for I := 1 to 100 do WPRichText1.InputString('text ');
WPRichText1.InputString('end.' + #13);
#4 ♥ 1
This category is archived. No new posts are possible.