{"id":16295775,"url":"https://github.com/hamlim/react-code-editor","last_synced_at":"2025-09-08T06:39:56.858Z","repository":{"id":36659310,"uuid":"171173234","full_name":"hamlim/react-code-editor","owner":"hamlim","description":"A lightweight react code editor component with a few highlights","archived":false,"fork":false,"pushed_at":"2025-06-03T21:50:11.000Z","size":2998,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-01T21:54:30.337Z","etag":null,"topics":["code-editor","editor","react","react-hooks"],"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/hamlim.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}},"created_at":"2019-02-17T21:14:26.000Z","updated_at":"2025-06-03T21:50:05.000Z","dependencies_parsed_at":"2023-01-17T04:00:32.385Z","dependency_job_id":null,"html_url":"https://github.com/hamlim/react-code-editor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hamlim/react-code-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-code-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-code-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-code-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-code-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamlim","download_url":"https://codeload.github.com/hamlim/react-code-editor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamlim%2Freact-code-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274146645,"owners_count":25230116,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["code-editor","editor","react","react-hooks"],"created_at":"2024-10-10T20:19:46.410Z","updated_at":"2025-09-08T06:39:56.814Z","avatar_url":"https://github.com/hamlim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Code Editor\n\nThis repo has been migrated to my Projects monorepo here: https://github.com/hamlim/projects/tree/master/packages/react-code-editor.\n\n`@matthamlin/react-code-editor` is an opinionated package built on top of React Hooks and react-simple-code-editor.\n\nIt implements a lightweight code editor component that supports the following enhancements:\n\n- Line commenting via `Cmd + /` or `Ctrl + /`\n- Format on Save via `Cmd + s` or `Ctrl + s`\n- maybe more soon???\n\n## Usage\n\n```jsx\nimport React from 'react'\nimport Editor from '@matthamlin/react-code-editor'\nimport { highlight, languages } from 'prismjs/components/prism-core'\nimport 'prismjs/components/prism-clike'\nimport 'prismjs/components/prism-javascript'\nimport prettier from 'prettier/standalone'\nimport babelPlugin from 'prettier/parser-babylon'\n\nconst code = `import React from \"react\";\nimport ReactDOM from \"react-dom\";\nfunction App() {\n  return (\n    \u003ch1\u003eHello world\u003c/h1\u003e\n  );\n}\nReactDOM.render(\u003cApp /\u003e, document.getElementById(\"root\"));`\n\nfunction App() {\n  return (\n    \u003cEditor\n      initialValue={code}\n      highlight={code =\u003e highlight(code, languages.jsx)}\n      padding={10}\n      style={{\n        fontFamily: '\"Fira code\", \"Fira Mono\", monospace',\n        fontSize: 12,\n      }}\n      formatOnSave\n      formatCode={code =\u003e\n        prettier.format(code, { parser: 'babel', plugins: [babelPlugin] })\n      }\n    /\u003e\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Freact-code-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamlim%2Freact-code-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamlim%2Freact-code-editor/lists"}