{"id":13769938,"url":"https://github.com/dev-juju/codebox","last_synced_at":"2026-02-21T02:51:59.806Z","repository":{"id":39792341,"uuid":"239874080","full_name":"dev-juju/codebox","owner":"dev-juju","description":"Code highlighting tool for Editor.js","archived":false,"fork":false,"pushed_at":"2023-03-15T05:18:58.000Z","size":487,"stargazers_count":40,"open_issues_count":11,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-10T21:45:53.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-juju.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"dev-juju","patreon":"bomdisoft"}},"created_at":"2020-02-11T22:04:14.000Z","updated_at":"2025-07-08T12:53:15.000Z","dependencies_parsed_at":"2023-07-17T12:38:24.124Z","dependency_job_id":null,"html_url":"https://github.com/dev-juju/codebox","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.09677419354838712,"last_synced_commit":"46b0d4e6bf98b1c44a74f1b76b4c7e344dae3093"},"previous_names":["bomdizane/codebox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-juju/codebox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-juju%2Fcodebox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-juju%2Fcodebox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-juju%2Fcodebox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-juju%2Fcodebox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-juju","download_url":"https://codeload.github.com/dev-juju/codebox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-juju%2Fcodebox/sbom","scorecard":{"id":23562,"data":{"date":"2025-08-11","repo":{"name":"github.com/dev-juju/codebox","commit":"46b0d4e6bf98b1c44a74f1b76b4c7e344dae3093"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T17:21:07.311Z","repository_id":39792341,"created_at":"2025-08-14T17:21:07.311Z","updated_at":"2025-08-14T17:21:07.311Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-03T17:00:32.917Z","updated_at":"2026-02-21T02:51:54.793Z","avatar_url":"https://github.com/dev-juju.png","language":"TypeScript","funding_links":["https://github.com/sponsors/dev-juju","https://patreon.com/bomdisoft"],"categories":["Tools"],"sub_categories":["Block Tools"],"readme":"# CodeBox\n\n[![](https://img.shields.io/npm/v/@bomdi/codebox)](https://www.npmjs.com/package/@bomdi/codebox)\n[![](https://img.shields.io/npm/dw/@bomdi/codebox)](https://www.npmjs.com/package/@bomdi/codebox)\n[![](https://flat.badgen.net/npm/license/@bomdi/codebox)](https://www.npmjs.com/package/@bomdi/codebox)\n[![](https://flat.badgen.net/badge/icon/typescript?icon=typescript\u0026label)](https://www.npmjs.com/package/@bomdi/codebox)\n\nCode syntax highlighting tool for [Editor.js](https://editorjs.io/)\n\n## Setup\n\nInstall the package via NPM\n\n```shell\nnpm i @bomdi/codebox\n```\n\nAdd to your module/application\n\n```javascript\nimport CodeBox from '@bomdi/codebox';\nOR\nconst CodeBox = require('@bomdi/codebox');\n```\n\n\n## Usage\n\nAdd CodeBox `tools` property of the CodeX Editor initial config.\n\n```javascript\nconst CodexEditor = require('@editorjs/editorjs');\n\nlet editor = new CodexEditor({\n  ...\n\n  tools: {\n    ...\n    codeBox: {\n      class: CodeBox,\n      config: {\n        themeURL: 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/dracula.min.css', // Optional\n        themeName: 'atom-one-dark', // Optional\n        useDefaultTheme: 'light' // Optional. This also determines the background color of the language select drop-down\n      }\n    },\n  }\n\n  ...\n});\n```\n\n## Config Params\n\n**All parameters are optional**\n\n| Field              | Type     | Description                   |\n| ------------------ | -------- | ------------------------------|\n| themeURL           | `string` | URL pointing to CSS file that can be used by [highlight.js](https://highlightjs.org/). This could also point o your own custom CSS syntax file. If **themeURL** is provided, **themeName** and **useDefaultTheme** will be ignored |\n| themeName          | `string` | Any one of the [accepted theme names](https://github.com/highlightjs/highlight.js/tree/master/src/styles) used by **highlight.js**. Only the name is required, not the full URL (example \"a11y-dark\"). If **themeName** is provided, **useDefaultTheme** will be ignored |\n| useDefaultTheme    | `string` | **CodeBox** has 2 default themes - 1 light and 1 dark. You can specify what default should be applied by passing the string **'light'** or **'dark'** to this parameter. Note that setting **themeURL** or **themeName** overrides this setting for the main code block, however, the background of the language select element/dropdown menu is set by this value |\n\nIf no parameters are specified, CodeBox defaults to a dark theme.\n\n## Output data\n\nCodeBox returns the following data\n\n```json\n{\n  \"type\": \"codeBox\",\n  \"data\": {\n    \"code\": \"consttest = newTest();.codeBoxTextArea{\\n  width: 100%;\\n  min-height: 30px;\\n  padding: 10px;\\n  border-radius: 2px 2px 2px 0;\\n  border: none !important;\\n  outline: none !important;\\n  font: 14px monospace;\\n}\\n\\n.codeBoxSelectDiv{\\n  display: flex;\\n  flex-direction: column;\\n  justify-content: flex-start;\\n  align-items: flex-start;\\n  position: relative;\\n}\",\n    \"language\": \"css\",\n    \"theme\": \"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/atom-one-dark.min.css\"\n  }\n}\n```\n\n## Render saved data as component\n\nIf you use react, you can pass your saved data to the library [editorjs-react-renderer](https://www.npmjs.com/package/editorjs-react-renderer) to render a code block component\n\n```javascript\nimport { CodeBoxOutput } from 'editorjs-react-renderer';\n\nconst data = {\n  \"type\": \"codeBox\",\n  \"data\": {\n    \"code\": \".codeBoxTextArea{\\n  width: 100%;\\n  min-height: 30px;\\n  padding: 10px;\\n  border-radius: 2px 2px 2px 0;\\n  border: none !important;\\n  outline: none !important;\\n  font: 14px monospace;\\n}\\n\\n.codeBoxSelectDiv{\\n  display: flex;\\n  flex-direction: column;\\n  justify-content: flex-start;\\n  align-items: flex-start;\\n  position: relative;\\n}\",\n    \"language\": \"css\",\n    \"theme\": \"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/atom-one-dark.min.css\"\n  }\n};\n\nconst CodeBlock = () =\u003e CodeBoxOutput(data);\n\nexport default CodeBlock;\n```\n\n\n## Author\n\nDev Juju\n\n[Contact Us](https://bomdisoft.com)\n\n[Learn](https://devjuju.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-juju%2Fcodebox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-juju%2Fcodebox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-juju%2Fcodebox/lists"}