---
canonical: "https://www.jsolly.com/blog/Adding-code-snippets-ckeditor/"
title: "Adding Code Snippets to ckeditor: A Step-by-Step Guide"
description: "Learn how to quickly and easily add Code Snippets and plugins to ckeditor. Follow this guide to install plugins and format code snippets in your blog posts."
author: "John Solly"
published: "2021-12-31T07:20:23.000Z"
updated: "2021-12-31T07:20:23.000Z"
---

<a id="adding-code-snippets-to-ckeditor-a-step-by-step-guide"></a>

# Adding Code Snippets to ckeditor: A Step-by-Step Guide

![List of languages available to snippet. Python, CSSS, YAML, JSON, Git, SQL](https://www.jsolly.com/blog/media/migrated/image-dd06b4ef868e0dfc7704ecb2-170.webp)

I realized when making posts that ckeditor does not include a code snippets tool. This is useful functionality because it lets you copy/paste code into your post and formats it depending on the language type.

Went over to ckeditor's plugin page and found [Code Snippets](https://ckeditor.com/docs/ckeditor4/latest/features/codesnippet.html). Installing it was easy using the [ckeditor builder](https://ckeditor.com/cke4/builder). You add all the plugins you want, choose a theme, and download a prepacked .zip file containing everything you need. All you have to do is was copy it into your /static/ckeditor folder.

<pre tabindex="0"><code class="language-python">print("Hello World")</code></pre>

December 31, 2021 in [Web Dev](https://www.jsolly.com/blog/category/web-dev/)

Updated December 31, 2021

## Search

This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_43369889032b1355b89bc7f4&query=<URL-encoded question>. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.
