{"id":18550957,"url":"https://github.com/mikescops/redactor-codeblock-plugin","last_synced_at":"2025-07-13T01:03:38.139Z","repository":{"id":77354775,"uuid":"427918360","full_name":"Mikescops/redactor-codeblock-plugin","owner":"Mikescops","description":"🖹 Imperavi Redactor Plugin for adding Code Blocks in your toolbar (multiple languages supported with highlight.js)","archived":false,"fork":false,"pushed_at":"2021-11-14T14:42:32.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T10:11:34.587Z","etag":null,"topics":["codeblocks","highlight","imperavi","plugin","redactor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mikescops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-14T12:09:34.000Z","updated_at":"2021-11-16T16:28:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6e457d2-9364-437c-84a7-a1d9a74b24ab","html_url":"https://github.com/Mikescops/redactor-codeblock-plugin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mikescops/redactor-codeblock-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fredactor-codeblock-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fredactor-codeblock-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fredactor-codeblock-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fredactor-codeblock-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mikescops","download_url":"https://codeload.github.com/Mikescops/redactor-codeblock-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fredactor-codeblock-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265076593,"owners_count":23707534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeblocks","highlight","imperavi","plugin","redactor"],"created_at":"2024-11-06T21:06:27.404Z","updated_at":"2025-07-13T01:03:38.126Z","avatar_url":"https://github.com/Mikescops.png","language":"JavaScript","readme":"# 🖹 Redactor Codeblock Plugin\nImperavi Redactor Plugin for adding Code Blocks in your toolbar (multiple languages supported).\n\nThis plugin creates `\u003cpre\u003e\u003ccode\u003e\u003c/code\u003e\u003c/pre\u003e` tags that allows [highlight.js](https://highlightjs.org/) to style your code depending on the language.\n\n## Usage\n\nA new button is available in the Redactor toolbar, to insert a new code block, the dropdown will suggest you a pre-selected list of languages for syntax highlighting.\n\nYou can select text in your content to convert it to a code block.\n\nYou can also remove a codeblock by putting your cursor on it and select any language in the dropdown.\n\n\n## Supporting more languages\n\nIn the script, you can edit the `this.languages` to add more code languages to it, the ones you're likely to use.\n\nThe are around 196 languages supported, [check them here](https://highlightjs.org/static/demo/).\n\n## How to install in Bolt CMS\n\nClone this repository (or copy js plugin file content) to the paht: `/public/assets/redactor/_plugins/codeblock/codeblock.js`.\n\nEdit the `config/bolt-redactor.yaml` file with the following content:\n\n```yaml\nplugins:\n  codeblock: ['../_plugins/codeblock/codeblock.js']\n```\n\nMake sure to add codeblock in the pugins line too:\n\n```yaml\nplugins: [ fullscreen, table, video, imagemanager, definedlinks, alphalist, codeblock]\n```\n\n## Resources\n\n- [Imperavi - Redactor API Services](https://imperavi.com/redactor/docs/api-services/)\n- [Imperavi - How to create a plugin for Redactor](https://imperavi.com/redactor/docs/how-to/create-a-plugin/)\n\n## Maintainer\n\n| [![twitter/mikescops](https://avatars0.githubusercontent.com/u/4266283?s=100\u0026v=4)](https://pixelswap.fr 'Personal Website') |\n| --------------------------------------------------------------------------------------------------------------------------- |\n| [Corentin Mors](https://pixelswap.fr/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikescops%2Fredactor-codeblock-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikescops%2Fredactor-codeblock-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikescops%2Fredactor-codeblock-plugin/lists"}