Jump to content

Alfred4: RichText (RTF) snippets + Evernote = no luck

Recommended Posts

I was super excited to hear about RichText being added to the Snippets function, and one of the first things I did was try it out with Evernote. I have certain styled blocks of text that I want to always re-use in Evernote and I was hoping to use Alfred as a simple template library for these. Alas, it doesn't seem to work right.


Example, here's a section (simple text/codeblock) that I wanted to make into a snippet. In EN it looks like this:



I created a RichText snippet from this and then tried pasting it into a note, here's how it came out:

(note the codeblock formatting is missing, there is a faint gray background separating each line of text, and the header font has changed from Arial to Times)



Not sure if this is fixable from Alfred's side or if it's just a peculiarity of how Evernote deals with rich text but... it's no good 😟

For comparison, the same snippet saved in PasteBot and then pasted into EN works fine and is perfectly formatted.


(Alfred 4.0.1 b1078)

Edited by luckman212
Link to post

@luckman212 I too got my hopes up about using snippets to paste appropriately styled text into Evernote and the Notes app. 🤦‍♂️


To be honest, I wasn't surprised by Evernote. It's always been flaky. At the moment, I can't even get it to accept Rich Text snippets from Alfred that aren't discolored or without some other problem (I use the app in Dark Mode).


However, I was a little more surprised by the Notes app, since it's native to MacOS. Any ideas how to maintain its simple Title, Heading, or Body tags?


Has anyone else had any luck using snippets with formatted text in Evernote or the Notes app? It's got to be possible to apply the appropriate tags or styles to snippet-related text - even if it's processed via another step. Thanks for any help you can lend!

Link to post

Notes is quirky.


From Alfred, I can get bold, italic and underline to stick, and bullets, but nothing else.


From Ulysses, if I Copy as RTF, I can get headings (## or H2) as headings but titles (# or H1) come in as headings as well.  Or, rather, Notes doesn't treat H1 as a title.



Link to post
4 hours ago, Jasondm007 said:

Has anyone else had any luck using snippets with formatted text in Evernote or the Notes app?


Looking at the raw data, it's just basic RTF formatting. Title = 34pt size and Heading = 24pt.


So if you format your text to 34pt, in Notes.app it shows style "Title". Same for 24pt and "Heading".





Link to post

Hi @dfay & @deanishe  - Thanks for the feedback and for taking a crack at it! I really appreciate it.


@deanishe I've tried this countless times today, and just haven't had any luck.


So that I'm clear, are you recommending, in Alfred's snippet viewer, to change the font size as follows: Titles to 34, Headings to 24, and Body to 12 (or anything, since Body appears to be the default)? If so, are you also defining the Family and Typeface (Yours looks like Helvetica Neue - Regular)? Finally, once you trigger the snippet in the Notes app, yours automatically recognizes everything appropriately?


I've tried countless variations, and my text usually comes out with Body tags - i.e., regardless whether it actually looks looks identical to the Notes app's text. However, I did notice that if the text is 34, or larger, it's usually recognized as a Heading. That said, I was never able to find the appropriate size or settings for Titles. 


If possible, could you share your working snippet?


Just for testing purposes, I also tried changing the ⌘V shortcut from "Paste" to "Paste and Retain Style" and it didn't fix anything either (Notes - Edit - Paste and Retain Style). FWIW - it did seem to create some new problems with the color of the text, however - often pasting the text in charcoal/black so that it was unreadable on a dark background. In any case, I've switched things back to normal.


Lastly, I'm not sure if it's helpful, but since we both appear to have different settings, I've included a few screenshots of my settings from the Notes app below. The first image shows my preferences in the app, and images 2-4 show what the text would look like if it were formatted appropriately.


As always, thank you both for all of your help!


Preferences - Image 1




Default Formatting in Notes app by tag, showing Fonts panel - Images 2-4






Link to post

Hi @deanishe and @dfay - OK, please ignore my previous post. After doing some more goofing around, I was able to find something that works on my system. Thanks again for all of your help!


To be clear, I have no idea why it works, and the other tests did not.  However, if others would benefit - and presumably have similar Notes settings - here's what worked for me in Alfred:








PS - Each is designated as a "System Font"


PPS - Just to be clear, the text does not look this way in the Notes app when the snippet is used. It's formatted in the appropriate tags - which for me is 17, 14, 12.

Edited by Jasondm007
Link to post

I'm on High Sierra, so that might make a difference.


I don't have the snippet any more: I deleted it.


What I did was create a note in Notes.app, copy it, then inspect the raw RTF with ClipboardViewer.


On High Sierra, I see the following (relevant bits after the first empty line):

{\fonttbl\f0\fnil\fcharset0 AppleSystemUIFontBold;\f1\fnil\fcharset0 AppleSystemUIFont;}

\f0\b\fs34 \AppleTypeServices\AppleTypeServicesF2293774 \cf2 This is the title\

\f1\b0\fs24 \AppleTypeServices\AppleTypeServicesF2293774 \cf2 \
\cf2 This is the intro\
\cf2 \

\f0\b\fs28 \AppleTypeServices\AppleTypeServicesF2293774 \cf2 This is a header\

\f1\b0\fs24 \AppleTypeServices\AppleTypeServicesF2293774 \cf2 \
\cf2 This is some text}

\fs34\fs24 etc. are text sizes.


In Alfred, I entered the text and then only changed the sizes of the title and header lines. Didn't touch the font or anything else.

Edited by deanishe
Link to post

@deanishe Thanks! Yeah, maybe it's a Mojave thing? 


I gave the Clipboard Viewer app a try, and boy is that thing confusing!


In any case, here are my settings for the text, as it appears in Notes w. the same text as above:

{\fonttbl\f0\fnil\fcharset0 AppleSystemUIFontBold;\f1\fnil\fcharset0 AppleSystemUIFont;}

\f0\b\fs34 \AppleTypeServices\AppleTypeServicesF2293774 \cf0 Title Text\

\f1\b0\fs24 \AppleTypeServices\AppleTypeServicesF2293774 \cf0 \

\f0\b\fs28 \AppleTypeServices\AppleTypeServicesF2293774 \cf0 Heading Text\

\f1\b0\fs24 \AppleTypeServices\AppleTypeServicesF2293774 \cf0 \
Body Text}


Link to post
11 minutes ago, Jasondm007 said:

I gave the Clipboard Viewer app a try, and boy is that thing confusing!


Not the most polished app (it's just a demo of the clipboard APIs), but I really like it. It's cool to be able to see all the different formats apps copy data to the clipboard in.


14 minutes ago, Jasondm007 said:

In any case, here are my settings for the text, as it appears in Notes w. the same text as above:


Weird. The text sizes look the same as for me, but you say you need different sizes to get Notes.app to work.


Perhaps I'm completely wrong and was just lucky…

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...