Sitecore
Lightning Tip: Adding a New Code Snippet to the Sitecore Rich Text Editor
March 29, 2018 Anne Saulnier

This Lightning Tip video, we’re going to walk through how to add in a code snippet that Content Editors can easily add into a Rich Text field using the Sitecore Rich Text Editor.

adding a new code snippet

To view this video, either request complimentary access to all of our marketing and technology contentclick here to view, or sign in with your existing account now.

 

 

From the Sitecore Experience Platform Dashboard, navigate to the Desktop





In the bottom right-hand corner of the screen, switch from the Master database to the Core database.



Navigate to the Content Editor.



Navigate to System > Settings > Html Editor Profiles




Find the Rich Text Editor that you’re currently using. If you’re not sure, navigate to the /sitecore/admin/showconfig.aspx page from your environment and do a search for your HtmlEditor.DefaultProfile setting.



Do you want to change what you’re using? Check out my friend Erik’s video overview on how this is done.

Expand the Rich Text Editor folder and navigate to Snippets



 
Duplicate any existing snippet by right-clicking on it and choosing Duplicate.



Enter a name for your new snippet and click OK.



Populate the Header field with the title you’d like your Content Authors to see



Save your changes.

Switch back to the Master database via the icon in the bottom right of your screen.





Go back to the Content Editor and find an item you’d like to test out your new snippet with.



From the Rich Text Editor, click the Code Snippet icon.


Pick your new snippet from the list.




Your new snippet is added to the field and ready for editing.

Anne Saulnier
Project Manager, Digital Strategist