Field in document and CodeOpeningText

  • Hello,

    I'm using fields in my documents with a custom opening and closing char :

    Code
    WPRichText.InsertPointAttr.Hidden := True;  WPRichText.InsertPointAttr.CodeOpeningText := '[';  WPRichText.InsertPointAttr.CodeClosingText := ']';

    Then I show the special characters on my document:

    Code
    WPRichText.ViewOptions := WPRichText.ViewOptions +       [wpShowCR, wpShowFF, wpShowNL, wpShowSPC, wpShowHardSPC, wpShowTAB]

    The [ and ] are therefore visible on the document. Now I found out that some users are deleting the closing char "]" of some fields but not the opening char "[", which causes many problems in the document.

    What would you suggest in this case ? Is it possible to detect when a user is deleting the opening or closing char of a field ?