We are having a bit of an issue with copying and pasting from Excel into fill ins where it adds random characters. I've narrowed it down to the fact that excel sticks CHR(10) on the end of things you copy. I wrote some code on the CTRL-V trigger to strip off the trailing CHR(10) and it worked a charm. So I then put it in as a global trigger "ON CTRL-V ANYWHERE". It works a treat for fill-ins because the paste still fires. But for Editors the paste no longer fires.
Why is there this inconsistency? What can I do to get around it? I still want the paste to fire after I've sanitised the Clipboard Value.
Version 11.2.1
Running on Windows.
Are you stripping out the CHR(10) by modifying CLIPBOARD:VALUE? If so, I think all you should need to do is add the following in the CTRL-V trigger:
IF SELF:TYPE = "EDITOR" THEN
SELF:EDIT-PASTE().
Fill-ins get more default handling of behaviors like this for historical reasons. You generally have to handle them yourself in editors.
Thanks Matt. Yes I was right trimming the CHR(10) off the end. I didn't know the EDIT-PASTE function existed and that has solved my problem perfectly. Many thanks! :)