Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

OMGitsDaYisus

macrumors member
Original poster
Dec 14, 2016
38
2
Spain
Hello there people!

I've recently created my very first custom shortcut for iOS devices. The main functionality of this shortcut is to draw a draft of whatever you're thinking and converting it into a .pdf document you can share with other people or save inside your device. The link is down below. If anyone has any shortcut that wants to share then answer this post and let it spread through the community. Send screenshots if you wish.

Download link: https://www.icloud.com/shortcuts/58c8368d183b476baa1461778169d0c6
 
Last edited:
An alternative is switching out the website for the Text and Make Rich Text from HTML actions. Then you make a list that switches out the background color/CSS based textures.

We have a thread here by the way: https://forums.macrumors.com/threads/shortcuts-app-share-your-shortcuts-here.2138775/

Thanks for that tip Jessica, I've just upgraded it using your recommendations. I'll update the link and also upload it on the thread you mentioned, but how could I change the background colour? May you show me a way to do so and make the shortcut simpler and customizable?
 
Last edited:
When you use Make Rich Text from HTML, you're telling it to read the input as code. So what you have right now is a empty page identical to the blank.org website you originally used.

To hold your color choices, you'd use a dictionary. The key would be the color name, and the value would be the hex code/HSL/RGB/etc representation of that color. (When you're adding them, the type of value is Text.)

IMG_0053.jpg

And then you'd follow that with a Choose from List action.

Your Text action then needs to be changed to have some HTML code and include the chosen item.

text_action_html.png

HTML:
<html>
<body>
<style>
body {background: CHOSEN_ITEM_VARIABLE}
</style>
</body>
</html>

Note that I have the background attribute in the code itself because the dictionary is just colors. You would take that out and have it in your color's value if you wanted to use a combination of other CSS attributes to make it look like graph paper/etc.
 
When you use Make Rich Text from HTML, you're telling it to read the input as code. So what you have right now is a empty page identical to the blank.org website you originally used.

To hold your color choices, you'd use a dictionary. The key would be the color name, and the value would be the hex code/HSL/RGB/etc representation of that color. (When you're adding them, the type of value is Text.)

View attachment 791199

And then you'd follow that with a Choose from List action.

Your Text action then needs to be changed to have some HTML code and include the chosen item.

View attachment 791202

HTML:
<html>
<body>
<style>
body {background: CHOSEN_ITEM_VARIABLE}
</style>
</body>
</html>

Note that I have the background attribute in the code itself because the dictionary is just colors. You would take that out and have it in your color's value if you wanted to use a combination of other CSS attributes to make it look like graph paper/etc.

I've done as you said. The rest of the shortcut that is not shown contains the Share command. What's your opinion about it? Could it be upgraded? If so, could you advise me?

Image 1: https://imgur.com/bZqware

bZqware

Another thing I have run into when making this shortcut and following your previous advice was that the color wouldn't fill the whole page when editing with the Markup tool. Does that have to do with the way the .html is or can that be changed? I mean, for the blank page it's ok, but when using another color it leaves that white 'frame'.

Image 2: https://imgur.com/2wT0XOg

2wT0XOg

I didn't have the opportunity to thank you for all the advice you've given me during the process of upgrading this shortcut, so finally... thank you so much!
 
If you're going to use a regular list (probably because you don't like the hex codes showing up underneath?), you need to set a variable to the dictionary, and then after Choose from List, get the variable of the dictionary, use the Get Dictionary Value action, the key being the chosen item from that list, and then you'd pass the Text action that value.

IMG_0059.jpg

IMG_0060.jpg

IMG_0061.jpg

You don't need to give the chosen item a variable by the way. It shows up in the bar above the keyboard. But if you are, it's a good idea to give it a more readable name like "Color Value".
 
Thank you again. Once and for all the shortcut is running and ready for uploading. Thank you for giving me advice and providing me with knowledge to make the best of this shortcut. I will post it on the thread you mentioned and in my profile. ;)
 
If you're going to use a regular list (probably because you don't like the hex codes showing up underneath?), you need to set a variable to the dictionary, and then after Choose from List, get the variable of the dictionary, use the Get Dictionary Value action, the key being the chosen item from that list, and then you'd pass the Text action that value.

View attachment 791661

View attachment 791662

View attachment 791663

You don't need to give the chosen item a variable by the way. It shows up in the bar above the keyboard. But if you are, it's a good idea to give it a more readable name like "Color Value".

Just one more thing. Could I convert that .pdf document to an image type file? I've just used the shortcut while taking notes from a lecture and I couldn't attach it as an image onto pages.
 
Yeah, you'd use Convert Image after Markup.

Yes, that was what I first tried, but when I draw on the page and open it (trying to use both save to Files and Gallery) it appears blank. Does it have anything to do with the image format? Please advice me :)
 
Yes, that was what I first tried, but when I draw on the page and open it (trying to use both save to Files and Gallery) it appears blank. Does it have anything to do with the image format? Please advice me :)

Putting it before Markup works. But then you wouldn't get it as a PDF to begin with.

It is not working on either macOS or iOS Pages here either.
 
Putting it before Markup works. But then you wouldn't get it as a PDF to begin with.

It is not working on either macOS or iOS Pages here either.

Thanks for that one! Well, I personally think that an image is better than a pdf specially when messaging, as a whole preview isn't shown in most apps. Thanks again for the help!
[doublepost=1538854607][/doublepost]
Great thread!

Thanks! Have you tried out the shortcut?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.