Hello,
I have written a custom language using external tokenizers. The tokenizers accept only values which are loaded at runtime (from server API). There are multiple such external tokenizers like field, fieldValue and keywords. The keyword is always first, followed by the field and fieldValues. In the external tokenizer, I use context tracker, to store keywords that were already accepted as valid tokens, so that the tokenizer can accept only fields that support these keywords as valid tokens. When the user inputs a token fieldValue, I remove the stored keywords from the context tracker.
This works well when the user types new input at the end, but I do not know how to correctly detect when the user decides to write e.g. in the middle of the currently existing input or deletes part of the input. I would need to update the context tracker in these situations but I am not sure how to achieve this.