{"id":20461166,"url":"https://github.com/moroboxai/moroboxai-editor-react","last_synced_at":"2026-04-15T16:04:41.687Z","repository":{"id":38886563,"uuid":"483934942","full_name":"moroboxai/moroboxai-editor-react","owner":"moroboxai","description":"Embeddable code editor for coding AIs for MoroboxAI in React","archived":false,"fork":false,"pushed_at":"2023-11-01T07:52:47.000Z","size":1851,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T11:55:10.578Z","etag":null,"topics":["code-editor","javascript","library","moroboxai","react","reactjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moroboxai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-04-21T06:36:47.000Z","updated_at":"2023-11-01T17:15:14.000Z","dependencies_parsed_at":"2022-08-29T05:31:05.959Z","dependency_job_id":"e7fe65ac-89ee-49db-96f7-2fd246d2b6e1","html_url":"https://github.com/moroboxai/moroboxai-editor-react","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroboxai%2Fmoroboxai-editor-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroboxai%2Fmoroboxai-editor-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroboxai%2Fmoroboxai-editor-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moroboxai%2Fmoroboxai-editor-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moroboxai","download_url":"https://codeload.github.com/moroboxai/moroboxai-editor-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242017584,"owners_count":20058460,"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":["code-editor","javascript","library","moroboxai","react","reactjs","typescript"],"created_at":"2024-11-15T12:23:52.420Z","updated_at":"2026-04-15T16:04:41.636Z","avatar_url":"https://github.com/moroboxai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moroboxai-editor-react\n\n[![NPM version](https://img.shields.io/npm/v/moroboxai-editor-react.svg)](https://www.npmjs.com/package/moroboxai-editor-react)\n![Node.js CI](https://github.com/moroboxai/moroboxai-editor-react/workflows/Node.js%20CI/badge.svg)\n[![gitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/moroboxai/moroboxai-editor-react/blob/master/LICENSE)\n[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/moroboxai/moroboxai-editor-react.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/moroboxai/moroboxai-editor-react/context:javascript)\n[![Total Alerts](https://img.shields.io/lgtm/alerts/g/moroboxai/moroboxai-editor-react.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/moroboxai/moroboxai-editor-react/alerts)\n\nEmbeddable code editor for coding AIs for [MoroboxAI](https://github.com/moroboxai) in [React](https://reactjs.org/).\n\n## Installation\n\nUsing npm:\n\n```bash\nnpm install moroboxai-editor-react --save\n```\n\nOr:\n\n```bash\ngit clone https://github.com/moroboxai/moroboxai-editor-react.git\ncd moroboxai-editor-react\nnpm i\nnpm run build\n```\n\n## Usage\n\nSetup a simple React app with:\n\n```bash\nnpx create-react-app my-app --template typescript\n```\n\nAdd `moroboxai-editor-react` as a dependency:\n\n```bash\ncd my-app\nnpm install moroboxai-editor-react --save\n```\n\nReplace `src/App.tsx` with:\n\n```javascript\nimport './App.css';\nimport Editor from 'moroboxai-editor-react';\n\nfunction App() {\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cheader className=\"App-header\"\u003e\n        \u003cEditor\n          value={'function foo() {\\n  console.log(\"foo\");\\n}\\n'}\n          width=\"500px\"\n          height=\"400px\"/\u003e\n      \u003c/header\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\nBuild and start a local server to see the result:\n\n```bash\nnpm run build\nnpm run start\n```\n\n## Playground\n\nThis package provides a minimal `React` app under the `playground` directory for playing with and testing the library.\n\nYou can run the playground locally on port 3000 with:\n\n ```bash\n git clone https://github.com/moroboxai/moroboxai-editor-react.git\n cd moroboxai-editor-react\n npm i\n cd playground\n npm i\n npm run dev\n ```\n\nIf you want to change something in the library, go to `moroboxai-editor-react/src/...`, the library will be automatically re-built and the playground will use the latest build\n\n## Props\n\n| Name   |      Type      |  Default |  Description |\n|:----------|:-------------|:------|:------|\n| language | string | javascript | Selected language |\n| value | string || Initial content of the editor |\n| width | string || Width of the `div` element |\n| height | string || Height of the `div` element |\n| className | string || Class name for the `div` container |\n| onLoad | func | noop | **Signature: function(value: string) =\u003e void** \u003cbr/\u003e Function called when the Load button is clicked |\n| onUnload | func | noop | **Signature: function() =\u003e void** \u003cbr/\u003e Function called when the Unload button is clicked |\n\n## License\n\nThis content is released under the [MIT](http://opensource.org/licenses/MIT) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoroboxai%2Fmoroboxai-editor-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoroboxai%2Fmoroboxai-editor-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoroboxai%2Fmoroboxai-editor-react/lists"}