{"id":19664705,"url":"https://github.com/wisersolutions/aor-codemirror","last_synced_at":"2025-04-28T22:30:55.378Z","repository":{"id":44165551,"uuid":"148826530","full_name":"WiserSolutions/aor-codemirror","owner":"WiserSolutions","description":"CodeMirror wrapper for Admin On Rest","archived":false,"fork":false,"pushed_at":"2023-07-18T20:17:09.000Z","size":901,"stargazers_count":1,"open_issues_count":14,"forks_count":3,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-18T18:08:57.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WiserSolutions.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":"2018-09-14T18:22:01.000Z","updated_at":"2021-09-21T07:07:30.000Z","dependencies_parsed_at":"2024-11-11T16:29:12.523Z","dependency_job_id":null,"html_url":"https://github.com/WiserSolutions/aor-codemirror","commit_stats":null,"previous_names":["wisepricer/aor-codemirror"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Faor-codemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Faor-codemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Faor-codemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WiserSolutions%2Faor-codemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WiserSolutions","download_url":"https://codeload.github.com/WiserSolutions/aor-codemirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397575,"owners_count":21583034,"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":[],"created_at":"2024-11-11T16:18:38.852Z","updated_at":"2025-04-28T22:30:54.841Z","avatar_url":"https://github.com/WiserSolutions.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Admin on Rest - CodeMirror\n\n[![CircleCI](https://circleci.com/gh/WisePricer/aor-codemirror.svg?style=svg\u0026circle-token=d8324b2c596c0982d37077984e2c6840b2ef2154)](https://circleci.com/gh/WiserSolutions/aor-codemirror)\n[![Maintainability](https://api.codeclimate.com/v1/badges/caf521533ef41d49142c/maintainability)](https://codeclimate.com/github/WisePricer/aor-codemirror/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/caf521533ef41d49142c/test_coverage)](https://codeclimate.com/github/WisePricer/aor-codemirror/test_coverage)\n\nWrapper around [CodeMirror](https://codemirror.net) for [react-admin](https://marmelab.com/react-admin/).\n\nSupported formats:\n\n* html\n* json\n* sql\n* javascript\n\n### Install\n\nInstall using npm: `npm install @wisersolutions/aor-codemirror`\n\n## Usage\n\nThe prop `name` will be mapped to `source` for react-admin.\n\n#### JSON editor\n\nWe should to turn on validation for JSON.\n\n```jsx harmony\nimport { CodeMirror, validJson } from 'aor-codemirror'\n\n\u003cCodeMirror label=\"My Label\" name=\"fieldName\" type=\"json\" defaultValue=\"{}\" required validate={validJson} /\u003e\n```\n\n\u003e Output from the CodeMirrror will be JSON object (not string);\n\n#### SQL editor\n\n```jsx harmony\nimport { CodeMirror } from 'aor-codemirror'\n\n\u003cCodeMirror label=\"My Label\" name=\"fieldName\"  type=\"sql\" required /\u003e\n```\n\n#### HTML editor\n\n```jsx harmony\nimport { required } from 'react-admin'\nimport { CodeMirror } from 'aor-codemirror'\n\n\u003cCodeMirror label=\"My Label\" name=\"fieldName\" type=\"html\" required validate={required} /\u003e\n```\n#### Javascript editor\n\n```jsx harmony\nimport { required } from 'react-admin'\nimport { CodeMirror } from 'aor-codemirror'\n\n\u003cCodeMirror label=\"My Label\" name=\"fieldName\" type=\"javascript\" required validate={required} /\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisersolutions%2Faor-codemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisersolutions%2Faor-codemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisersolutions%2Faor-codemirror/lists"}