{"id":13422155,"url":"https://github.com/fritx/react-editor","last_synced_at":"2026-03-02T03:04:27.715Z","repository":{"id":66094603,"uuid":"48916371","full_name":"fritx/react-editor","owner":"fritx","description":"Pure Rich-text Editor with TS \u0026 React-hooks","archived":false,"fork":false,"pushed_at":"2022-08-15T06:55:39.000Z","size":706,"stargazers_count":55,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"dev","last_synced_at":"2025-10-10T13:12:39.851Z","etag":null,"topics":["content-editable","editor","hooks","react","rich-text"],"latest_commit_sha":null,"homepage":"http://fritx.github.io/react-editor/","language":"TypeScript","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/fritx.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-02T16:42:06.000Z","updated_at":"2025-10-07T16:05:34.000Z","dependencies_parsed_at":"2023-05-04T19:48:16.660Z","dependency_job_id":null,"html_url":"https://github.com/fritx/react-editor","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"0ce134ecdd1fb8cab8962c6349adb3074ae7169b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fritx/react-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fritx","download_url":"https://codeload.github.com/fritx/react-editor/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritx%2Freact-editor/sbom","scorecard":{"id":411725,"data":{"date":"2025-08-11","repo":{"name":"github.com/fritx/react-editor","commit":"0ce134ecdd1fb8cab8962c6349adb3074ae7169b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"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"}}]},"last_synced_at":"2025-08-18T22:52:53.733Z","repository_id":66094603,"created_at":"2025-08-18T22:52:53.733Z","updated_at":"2025-08-18T22:52:53.733Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"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":["content-editable","editor","hooks","react","rich-text"],"created_at":"2024-07-30T23:00:38.199Z","updated_at":"2026-03-02T03:04:27.699Z","avatar_url":"https://github.com/fritx.png","language":"TypeScript","readme":"# react-editor is FINALLY RETURNED !!\n\n\u003e It's been over 4 years...\u003cbr\u003e\n\u003e Now react-editor is BACK with fully TS \u0026 REACT-HOOKS integrated\n\n- [x] Rich-text Editor with TS \u0026 React-hooks\n- [ ] Polyfill workaround with React \u003c 16.8\n- [x] Placeholder via CSS\n- [x] Methods: focus(), insertHTML(s), insertText(s)\n- [x] Auto saveRange, restoreRange, moveToEnd\n- [x] Usage of value/onChange, defaultValue/onChange\n- [x] In-web-image, File handleDrop\n- [ ] processHTML, processText wip\n- [x] 1.x Legacy: https://github.com/fritx/react-editor/tree/1.x\n- [x] 2.0-alpha Demo: https://fritx.github.io/react-editor\n\n```sh\nnpm i -S react-editor\n```\n\n```tsx\nimport { Editor } from 'react-editor'\n\nlet [value, setValue] = useState('')\nlet ref = useRef()\n\nref.focus()\nref.insertText('foo')\nref.insertHTML('\u003cimg src=\"https://foo.bar/baz.png\"\u003e')\nvalue = 'set content'\n\n\u003cEditor\n  ref={ref}\n  placeholder=\"Type message to send...\"\n  className={styles.editor}\n  value={value}\n  onChange={setValue}\n/\u003e\n```\n\n#### Props\n\n```tsx\nexport interface EditorProps {\n  value?: string;\n  defaultValue?: string;\n  className?: string;\n  placeholder?: string;\n  allowInWebDrop?: boolean;\n  processHTML?: (html: string) =\u003e string;\n  processText?: (text: string) =\u003e string;\n  onFocus?: (e: React.FocusEvent\u003cHTMLDivElement\u003e) =\u003e void;\n  onBlur?: (e: React.FocusEvent\u003cHTMLDivElement\u003e) =\u003e void;\n  onDrop?: (e: React.DragEvent\u003cHTMLDivElement\u003e) =\u003e void;\n  onPaste?: (e: React.ClipboardEvent\u003cHTMLDivElement\u003e) =\u003e void;\n  onChange?: (value: string) =\u003e void;\n  [restProp: string]: any; // onto \u003cdiv\u003e\n}\n\nexport interface EditorRefAttrs {\n  focus: () =\u003e void;\n  insertHTML: (html: string) =\u003e void;\n  insertText: (text: string) =\u003e void;\n}\n```\n\n**for umd / \\\u003cscript\u003e usage**\n\n```html\n\u003cscript src=\"https://unpkg.com/react\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/react-dom\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/react-editor\"\u003e\u003c/script\u003e\n\u003cscript src=\"myapp.js\"\u003e\u003c/script\u003e\n```\n\n```js\n// myapp.js\nlet React = window.React;\nlet ReactDOM = window.ReactDOM;\nlet { Editor } = window.ReactEditor;\n\nReactDOM.render(\u003cEditor /\u003e, mountNode);\n```\n\n**for react \u003c 16.8 we need hooks polyfill workaround**\n\n```tsx\n// todo\n```\n\n**for react-editor legacy version**\n\n```sh\nnpm i -S react-editor@1.x\n```\n\n---\n\nThis project was bootstrapped with [create-react-library](https://github.com/transitive-bullshit/create-react-library) \u0026 [react-ts-demo](https://github.com/fritx/react-ts-demo).\n","funding_links":[],"categories":["UI Components"],"sub_categories":["Form Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritx%2Freact-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffritx%2Freact-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritx%2Freact-editor/lists"}