Enable Code Snippets and Assign Permissions to Use Them

Use code snippets to enter syntax-highlighted code samples through the Chatter publisher. To make code snippets available, enable them and assign the permission to use them. There are two ways to enable code snippets and assign permission: through a user profile (step 1) or through a permission set (step 2). Code snippets are available in Lightning Experience and Experience Builder sites that are based on the Customer Service template.

  1. Enable code snippets through a user profile:
    1. In Setup, expand Manage Users (Users in Lightning Experience), click Profiles, then click Clone next to Standard User.
    2. Give the clone a Profile Name, and click Save.
    3. On the clone page, click Edit.
    4. Scroll to the General User Permissions section, select Allow Inclusion of Code Snippets from UI, and click Save.
    5. Under Manage Users, click Users.
    6. Edit each user you want to give code snippet permission to, and assign them the cloned user profile.
  2. Enable code snippets through a permission set:
    1. In Setup, expand Manage Users (Users in Lightning Experience), click Permission Sets, then click New.
    2. In the Label field, enter a name for the permission set.
    3. Optionally, pick a type of user license for this permission set. Pick None if you don’t want to limit this permission set to a particular license type.
    4. Click Save.
    5. On the new permission set page, under System, click System Permissions, then click Edit.
    6. Select Allow Inclusion of Code Snippets from UI, and click Save.
    7. Click Manage Assignments, then Add Assignments.
    8. Assign the new permission set, then click Done.

Your users can enter code snippets in the Chatter publisher. Users can’t add a code snippet to a list.