Beware with custom Paste menu command

Discussion created by Fred(CH) on Oct 29, 2015
Latest reply on Oct 29, 2015 by Fred(CH)

Espacially on OS X...


I initially wanted to invert the actual behavior where a cmd-V paste rich text. I wanted to have rich text only when explicitly requested (i.e. alt-cmd-V), so i died to use Custom Menus (CM) in order to accomplish it.


It had two main caveats :

  1. the Paste step behave natively "without style" when alt key is pressed and you cannot work around it. So if you try to trig it using alt key in custom menu, it will not paste rich text. And inverse is not true : if you check without style on the step, alt will not change the behavior it is always without style.
  2. as a developer, beware that most of manage dialogs and also the Data Viewer on a Mac will not switch to standard menus automatically. So when you have to paste an expression, your associated script (if any) is trying to perform and is stacked since the dialog is modal. Moreover, even if you are doing it without a script but just with a command/step directly associated to you CM, the Paste command will simply not work on those dialogs, even if without style is unchecked. The only way in order to paste on these dialogs is to have not any action associated to the Past menu command and thus, the "Based on existing command : Paste" checked.


Conclusion : better don't try it and keep the native behavior of having by default rich text on pasting.