Browse the docs

ask

A fill-in field in a snippet body, asked once before the text is typed.

Details #

ask("Label") or ask("Label|default") marks a field in a Type Text body. Before anything is typed, Switchboard shows one form with a field for every ask in the body, titled with the abbreviation, and puts each answer where its field was. In a body it is usually written as the token {{ask:Label}} or {{ask:Label|default}}. Asking the same label twice shows one field.

Escape in the form cancels: the abbreviation is typed back and nothing is expanded. A body with fields is pasted in one go.

The other two snippet markers are {{cursor}}, where the caret ends up, and {{sel}}, the text selected when the snippet was triggered.

Parameters #

Takes 1 to 2 arguments. {{ ask(text, b?) }}

Gotchas #

  • ask, cursor and sel work only in the text of a Type Text step. Anywhere else they fail with "only in a snippet body".