WPCubed Product Support

Remove indents from file unless bullets or numbers

Does anyone have an example to loop through the currattr or par styles of a document?
I would like to remove all indents unless it is a bulleted or numbered list and in that case, I would like to increase the indent.
Thank you.
-d

#1 ♥ 0
4.4k Views 2 users read 1 min
support

This should work

par := WPRichText1.FirstPar;
   while par<>nil do
   begin
      if par.Number=0 then
      begin
        par.ADel(WPAT_IndentLeft);
        par.ADel(WPAT_IndentFirst);
      end else
      begin
       par.ASet(WPAT_IndentLeft,par.AGetDef(WPAT_IndentLeft,0)+720);
      end;
      par := par.next;
   end;

   WPRichText1.ReformatAll(false, true);
#2 ♥ 0
This category is archived. No new posts are possible.