AnsweredAssumed Answered

Paste unformatted text by default

Question asked by anothersmurf on Apr 6, 2016
Latest reply on Apr 6, 2016 by ninja

I'm trying to make it easier for users to paste into the DB without unwanted text formatting. Status quo is they have to paste then undo, or remember to use the special "Paste Without Formatting", or call me and ask for help. All of these methods work, but they're kind of a pain.


Since I can create/modify menus, I figured I'd just rename Paste Without Formatting as "Paste" and change the keyboard command to match. While I was at it, I changed "Paste" to "Paste With Formatting", and gave it a different keyboard command, to get it out of the way but leave it as an option if needed.


This worked exactly as desired on every layout. However, when the cursor isn't on a layout, e.g. when editing a calculation or in the password-entry field when opening a DB. Paste no longer works. It just beeps. Only "Paste Without Formatting" works. So the problem is that my menu modification takes effect in places where it shouldn't...


There's a way to make menu items appear only conditionally, so I need a condition that's true only when a database window is active, and isn't true when editing a calc, opening a DB, etc. Unfortunately, I couldn't find such a conditional. "windownames" excludes all of the windows that I want to exclude, so that's no good. get(currentlayout) doesn't change when the active window isn't a layout window, so that doesn't work either.


Can anyone suggest a way to alter a menu item only on layouts, and not elsewhere? Or some other way to safely make unformatted pasting the default?