{"id":13525177,"url":"https://github.com/developit/preact-richtextarea","last_synced_at":"2025-07-29T09:40:28.579Z","repository":{"id":57147764,"uuid":"48508284","full_name":"developit/preact-richtextarea","owner":"developit","description":":newspaper: A text field that supports HTML editing. :memo:","archived":false,"fork":false,"pushed_at":"2018-01-17T20:03:14.000Z","size":19,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-25T19:38:01.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/preact-richtextarea","language":"JavaScript","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/developit.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}},"created_at":"2015-12-23T19:48:14.000Z","updated_at":"2025-04-23T00:03:11.000Z","dependencies_parsed_at":"2022-09-06T15:02:55.650Z","dependency_job_id":null,"html_url":"https://github.com/developit/preact-richtextarea","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/developit/preact-richtextarea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-richtextarea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-richtextarea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-richtextarea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-richtextarea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developit","download_url":"https://codeload.github.com/developit/preact-richtextarea/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-richtextarea/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267443473,"owners_count":24088012,"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-07-27T02:00:11.917Z","response_time":82,"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":[],"created_at":"2024-08-01T06:01:16.608Z","updated_at":"2025-07-29T09:40:28.557Z","avatar_url":"https://github.com/developit.png","language":"JavaScript","readme":"# preact-richtextarea\n\n[![NPM](http://img.shields.io/npm/v/preact-richtextarea.svg)](https://www.npmjs.com/package/preact-richtextarea)\n[![travis-ci](https://travis-ci.org/developit/preact-richtextarea.svg)](https://travis-ci.org/developit/preact-richtextarea)\n\nA `\u003ctextarea\u003e` that supports HTML editing, powered by [Preact] \u0026 contentEditable.\n\n---\n\n\n### Usage Example\n\nUse `\u003cRichTextArea /\u003e` like a normal `\u003cinput\u003e`. It supports the same props/attributes, including `value`, `onInput()` and `onChange()`.\n\n```js\nimport RichTextArea from 'preact-richtextarea';\n\nconst HtmlEditor = ({ html, ...props }) =\u003e (\n\t\u003cform class=\"html\"\u003e\n\t\tBody HTML:\n\t\t\u003cRichTextArea value={html} {...props} /\u003e\n\t\u003c/form\u003e\n);\n\nlet html = `\u003ch1\u003ehello\u003c/h1\u003e\u003cp\u003eTesting 1 2 3...\u003c/p\u003e`;\nrender(\u003cHtmlEditor html={html} /\u003e, document.body);\n```\n\n\n### Usage with Linked State\n\n`\u003cRichTextArea /\u003e` works with Linked State exactly the same way as any other input field:\n\n```js\nimport RichTextArea from 'preact-richtextarea';\n\nclass Form extends Component {\n\trender({ }, { html }) {\n\t\treturn (\n\t\t\t\u003cform\u003e\n\t\t\t\t\u003cRichTextArea value={html} onChange={ this.linkState('html') } /\u003e\n\t\t\t\u003c/form\u003e\n\t\t);\n\t}\n}\n\nrender(\u003cForm /\u003e, document.body);\n```\n\n\n---\n\n\n### License\n\n[MIT]\n\n\n[Preact]: https://github.com/developit/preact\n[MIT]: http://choosealicense.com/licenses/mit/\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fpreact-richtextarea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopit%2Fpreact-richtextarea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fpreact-richtextarea/lists"}