I have an action that offers a select interface (app.selectDraft) with a list of existing drafts in a workspace and then inserts a link to the selected draft at the cursor position.
I wonder if it is possible to add an additional button to the select promt. In case that the item I wanted to add is missing in the list, a “add new item” button would be helpful. But it seems to me that the draft selection interface is not customizable, right?
Thanks, that’s a good idea! In my case, however, the list would become very long and finding the right item would be too difficult.
Another solution that came into my mind is to use the cancel button. I.e. when the action is triggered, the select interface shows, allowing to select an existing draft. If there is no draft in the list, I cancel the select interface what brings up another prompt allowing to create a new draft, then links it and opens it.
That is not a modifiable UI element, correct. As you mention, you could check for if the user does not select a draft (cancels) - alternately, you could create a have a “special” draft in the workspace with just a known title, like “Create New Draft” and check if that draft is selected as a key to create the new one.
The last button („zur VKN“) takes the textField entry.
My question: How can I change the order of the buttons? In the script I create the buttons with numbers first, then the textField, then the „zur VKN“ button. Anyway, it is displayed as shown. Can I somehow change that? As it is now, it is not very clear that the last button belongs to the textField…
Then, is it possible to display further text in the prompt window, like between the buttons?
Buttons are always grouped as the last elements in a prompt. Probably the best option for visual separation is to make it the default button, which will pin it with the cancel button, and make it the button that responds to the default (⌘-return) keyboard shortcut. Like: