Snippets have landed!
While there are still more tasks in progress for 5.2, I didn’t want them to hold up this much-requested feature.
What are snippets?
Code Snippets are pre-defined HTML “snippets” that you attach to your sites. Users are able to select them from a dropdown menu in the Live Editor and the resulting code will be inserted for them.
You can use snippets for inserting special content blocks, testimonials, or just about any custom HTML you want. Think of them as mico-templates for your pages.
How to use them
You can manage code snippets starting today by going to Edit Code Snippets in the sidebar:
The Snippet Manager is very similar to the Template Manager. You can create, edit, and delete any number of snippets for each of your sites.
Here’s what the editor looks like:
Once you’ve created at least one snippet, you’ll be able to insert them from this menu in the Live Editor:
Very simply, when you select a snippet from the menu, the HTML code you entered will be injected into the editor.
I’m happy to finally see this in production. I can’t wait to see everyone using snippets!