There’s something deeply satisfying about typing plain Markdown.It’s minimal, portable, and human-readable — but when you want to display it on the web, it’s not always easy to find the right library. So I wrote CartaNova (ehm, I vibe coded…sorry I did it again 💁♀️) a lightweight Markdown-to-HTML library written in plain JavaScript. No dependencies, […]
Tag: JavaScript
[Salesforce] Handle encryption and decryption with Apex Crypto class and CrypoJS
One of the easiest Javascript libraries for encryption I usually adopt is CryptoJS, quick setup and good support for most algorithms. But I got an headache trying to make it talk with Salesforce, this was due to my relatively low encryption-topics training but also to a specific way Salesforce handles encryption. I was surprised that […]
[Javascript / Chrome / EasyPeasy] Blocking form autocomplete after Chrome Canary (version 65)
Recent Google Chrome update (65) brought something that developers are not liking too much: the autocomplete=”off” attribute on forms and inputs is no more considered. Read in depth this Stack Overflow thread. The solution (not so clear) is to give a random autocomplete value to the autocomplete attribute of each input of the form: $(‘form […]
[Salesforce / Javascript] Visualforce tips for Javascript nerds
No secret I love Javascript. It’s messy to the right point, it can be quick and dirty, it can be elegant, it can be wathever you are: your Javascript code can be a mirror of your personality. And what’s better that putting together 2 things I like the most? Yes, I’m talking about Salesforce and […]
[Salesforce/ Lightning] inputLookup: the missing component
Or quick tips on how to implement your own inputLookup Salesforce ligthning component This is a repost of the article I published on Salesforce Developer Blog. Salesforce Spring ’15 release brought some brand new components ready to be used in your lightning apps. One of the missing components that could be useful for your apps is […]
[Salesforce / RemoteAction] Using Date fields on a RemoteAction (PITA ALERT!)
I’ve just come through a bug on the Date field handling for Visual Force @RemoteAction. We want to pass to a remote action a list of SObjects to be handled correctly. This is the controller that hosts the @RemoteAction method: public class MyController(){ @RemoteAction public String doAction(List<contact> contacts){ return ‘All is ok!’; } } This […]
[Salesforce / JS] Download automatically files from apex (using href link and base64)
This post is a recap of this Salesforce Developer Forum thread. We want to trigger a download from an attachment but the running user don’t have access to the object (think of Community User for instance). In the controller read the Attachment’s body in a String getter coded in Base64: public String base64Value{get;set;} public String […]
[Salesforce / Lightning] Loading scripts
a{ color: red !important;} UPDATE Due to the introduction of the ltng:require, this post is no more a valid solution. Refer to the official Lightning documentation. This post has been more like a request for help, rather than a technical blog post, but it came to be an awesome way to see Salesforce community in […]
