WPCubed Product Support

Problem protecting text in end of Line.

Hi,

After protecting a text that is in the end of the line i can't type any text after text protected, i can't type #13 for new paragraph.

i set WpRichText>protectedPro = [ppProtected,ppAllowEditAtTextEnd,ppDontUseAttrOfProtected]

my code to protect selected text

with WPRichText1 do begin
CurrAttr.AddStyle([afsProtected]);
SetSelPosLen( CPPosition, 0 );
Refresh; SetFocus;
end;

rtf file with problem
[](http://www.drdsistemas.com/util/wp.rtf)

a source code of small project
[](http://www.drdsistemas.com/util/wp_proj.zip)

example:
🖼 www.drdsistemas.com

#1 ♥ 0
4.3k Views 3 links 3 users read 2 min

hm... just a small thought from my side 🙂

if you put a blank space behind every protected area and DON'T mark this blank space as protected it should work. If this fits for your case 🙂

But I'm not at work now and can't proof. As I said just a quick thought 🙂

#2 ♥ 0

Is there a better way to do this? How can I allow the user to enter text after the protected text (if the protected is at the end of the line)?

Adding a space doesn't work. If the user accidentally deletes the space, the paragraph can no longer be extended.

You would think ppAllowEditAtTextEnd would control this, but it doesn't. In my case, a protected bookmark (ppIsBookmark) is at the end of the line.

Now is the time for all good men to come to the aid of their country.[b:BOOK1]This is the bookmark text, afsProtected[/b]¶
#3 ♥ 0
This category is archived. No new posts are possible.