Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to dismiss the search box after "Search in Editor" workflow?
-
I'm still learning my way around Editorial so apologies if this is a remedial question. I have created several workflows that all revolve around using the "Search in Editor" action to replace found text. Everything works, but after the workflow completes the editor is left in search mode (i.e., the search box is visible instead of the document title). It's a bit annoying to have to press the "x" left of the search box to dismiss it. Is there a way to procedurally restore the view to the standard initial view or dismiss the search box after a search-based workflow completes? Thank you!
-
There is a workflow called Find and Replace that does that.
Or you could use the Find/Replace action included.
You have to use "Get document text" before the Find/replace action, as it needs something to look for the text in.
Better would be to use the workflow.
-
I ended up re-writing my workflow with a custom Python action. I took my sequence of "in editor" search/select/replace operations and replaced it with a short script that gets the document content, performs all of the substitutions, and sets the action output. Then it was a simple matter to select the whole document and replace selected text without any search operations. Thanks for pointing me in the right direction.