{"id":21018466,"url":"https://github.com/coralproject/rte","last_synced_at":"2025-05-15T06:31:35.289Z","repository":{"id":33151850,"uuid":"145961676","full_name":"coralproject/rte","owner":"coralproject","description":"A Lightweight Rich Text Editor based on React","archived":false,"fork":false,"pushed_at":"2023-07-18T22:03:56.000Z","size":1756,"stargazers_count":6,"open_issues_count":26,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-18T15:33:11.423Z","etag":null,"topics":["react","rich-text-editor","rte","typescript"],"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/coralproject.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}},"created_at":"2018-08-24T08:02:11.000Z","updated_at":"2024-02-15T01:35:23.000Z","dependencies_parsed_at":"2023-09-25T06:59:55.566Z","dependency_job_id":null,"html_url":"https://github.com/coralproject/rte","commit_stats":{"total_commits":86,"total_committers":10,"mean_commits":8.6,"dds":0.5,"last_synced_commit":"4e8e1d2a082125775fe25ef89eea79f1d692b855"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coralproject%2Frte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coralproject%2Frte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coralproject%2Frte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coralproject%2Frte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coralproject","download_url":"https://codeload.github.com/coralproject/rte/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254288203,"owners_count":22045862,"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":["react","rich-text-editor","rte","typescript"],"created_at":"2024-11-19T10:26:15.919Z","updated_at":"2025-05-15T06:31:34.580Z","avatar_url":"https://github.com/coralproject.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coral RTE [![CircleCI](https://circleci.com/gh/coralproject/rte.svg?style=svg)](https://circleci.com/gh/coralproject/rte)\n\nCoral RTE is a lightweight and extensible Rich Text Editor based on React and [Squire](https://github.com/neilj/Squire).\n\n[Demo](https://coralproject-rte.netlify.app/)\n\n## Installation\n\n```bash\nnpm install @coralproject/rte --save-dev\n```\n\n## Usage\n\n```js\nimport { CoralRTE, Bold, Italic, Blockquote } from \"@coralproject/rte\";\nimport createDOMPurify from \"dompurify\";\n\n// See https://github.com/cure53/DOMPurify\nconst DOMPurify = createDOMPurify(window);\n\nconst sanitizeToDOMFragment = (html) =\u003e {\n  if (!html) {\n    return document.createDocumentFragment();\n  }\n  return DOMPurify.sanitize(html, { RETURN_DOM_FRAGMENT: true });\n};\n\n\u003cCoralRTE\n  inputID=\"rte-field\"\n  className=\"coral-rte\"\n  contentClassName=\"coral-rte-content\"\n  placeholderClassName=\"coral-rte-placeholder\"\n  toolbarClassName=\"coral-rte-toolbar\"\n  onChange={(html) =\u003e setValue(html)}\n  value={value}\n  disabled={disabled}\n  placeholder={\"Enter some content\"}\n  features={[\u003cBold /\u003e, \u003cItalic /\u003e, \u003cBlockquote /\u003e]}\n  toolbarPosition=\"bottom\"\n  sanitizeToDOMFragment={sanitizeToDOMFragment}\n/\u003e;\n```\n\n## Development\n\n```bash\nnpm run dev\n```\n\n## Build\n\n```bash\nnpm run build\n```\n\n## Releasing\n\nWhen you're ready to release a new vesrion of `@coralproject/rte`,\nyou can do the following:\n\n1. Run `npm version --no-git-tag-version (major|minor|patch)` to update the\n   version number in package files.\n2. Push the changes to a new branch, and submit a PR against `main`.\n3. Once the changes have been approved, and all the code you want to deploy for\n   the version is in `main`, create a release with the version number: `v0.4.0`\n   (Note that the `v` prefix is required)\n\nCircleCI will run your tests and release the new version for you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoralproject%2Frte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoralproject%2Frte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoralproject%2Frte/lists"}