Hello people excited to be on this forum. I hope to learn a lot tips and best practices.
I’m looking for a solution to this:
I’m in a note, any note, and I select text, it can be a word or multiple words, and I copy it via the Norma copy paste menu or if Drafts 5 has its own.
Then paste it on the same note, just further down for example, a few return keys presses, but now the text has the following format:
{{c1::Myocardial Infarction}}
So my original text was: Myocardial Infarction
I selected it, copied it, and re pasted but with the formatting above.
Any help on this would be epic. Thanks!!!
Fingers crossed,
J
Why I’m using it: I’m using it to format question I do my iPhone or iPad to make flash cards to Anki, a software used for space repetition learning.
This action takes the currently selected text and replaces it with the currently selected text, followed by three new lines, followed by the selection wrapped in the format you showed above.
The action does not require the use of the clipboard, and so should have fewer steps; but still match the result I think you have described. It consists of a single insert text action step.
If the content was in amongst other text, this probably would not work as desired, but the principle remains and you could then tailor the insertion content and utilise the [[clipboard]] instead of [[selection]].
Thanks so much I was able to modify and it works like a charm now. I need to learn how to post to the forum for other possible members to benefit from it.
Thanks a ton. Can you give me a live example, I’m not a coder, but if you can just point at how how I should get started, I will be able to figure it out. So, I have the front and back of the card ready in Drafts, then what? Where do I copy the URL for this Draft? Do I have to make a separate draft for each card?
The [[title]] and [[body]] parts are where you can customize. These say: make the front of the card the first line of the draft and make the back of the card the rest of the lines of the draft.
You can customize this somewhat if you like. For example, maybe you want the whole draft on the back of the card and you want to be prompted to write the front of the card when you fire the action. Just add a prompt step before the Callback url. Make sure to add the “text field” to the prompt. Then your url would look like this:
But I have to paste in safari and go thru that whole process. Super slow
In your example you have [[title]] and [[body]]. Can these be any number of characters. Ie. “This is my Title because I need to have questions as titles” can I bracket this whole statement as title.
Also can I limit the body to some point. Meaning the first few sentence of the body. But below this I have more notes. But these don’t go. Oops I think I answered my own question. As long as the body is double bracketed it will be fine. It won’t grab the text below. Am I correct?
Now, this action in drafts that will hold this template. How does it look like in action. Can you elaborated this a bit more. Thank you so much. I guess this doesn’t work on the Drafts desktop component only iOS. Is that true.
I think you may be missing a step. The URL is not something to paste into Safari. Instead, you want to create an action in Drafts–look at the support documents I linked to in my post. So, what you would do is this:
Create the action following the guidelines in the Drafts support documents.
Type what you want on the front of the card in the first line of the Draft.
Type what you want on the back of the card in the rest of the Draft. This can be as many lines as you want.
Thanks so much it worked like a charm !!! I will have to check tomorrow morning if it will work from the desktop version of Drafts 5 as well but on iOS it’s amazing.
I might try to add Tags as well. In my case it will be same Tag.
Triple thanks for all your help. Here’s the visual part which may help some folks too. Notice how I added to the title the space HTML code because the it wouldn’t pass in the url saved in the action. I like my close returns ANKI to look like this.