{"id":19419674,"url":"https://github.com/rwu823/react-hi-text","last_synced_at":"2025-04-24T14:31:54.415Z","repository":{"id":41902825,"uuid":"43326057","full_name":"rwu823/react-hi-text","owner":"rwu823","description":"React text highlight component","archived":false,"fork":false,"pushed_at":"2023-12-15T05:52:49.000Z","size":35,"stargazers_count":24,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T23:05:45.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rwu823.github.io/react-hi-text","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/rwu823.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}},"created_at":"2015-09-28T20:46:24.000Z","updated_at":"2021-07-08T06:06:17.000Z","dependencies_parsed_at":"2024-01-17T15:04:41.228Z","dependency_job_id":"8ac1e249-c73e-4afa-aa2b-1ef126c790b8","html_url":"https://github.com/rwu823/react-hi-text","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.08108108108108103,"last_synced_commit":"eb97f7dc204b76f155b1cc49caa6527c4732f016"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-hi-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-hi-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-hi-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-hi-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwu823","download_url":"https://codeload.github.com/rwu823/react-hi-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250643460,"owners_count":21464180,"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-10T13:18:37.350Z","updated_at":"2025-04-24T14:31:54.168Z","avatar_url":"https://github.com/rwu823.png","language":"JavaScript","funding_links":[],"categories":["React"],"sub_categories":["React Components"],"readme":"# React text highlight component\n[![Build Status](https://img.shields.io/travis/rwu823/react-hi-text.svg?branch=master)](https://travis-ci.org/rwu823/react-hi-text)\n[![Coverage](https://img.shields.io/coveralls/rwu823/react-hi-text.svg?branch=master)](https://coveralls.io/github/rwu823/react-hi-text)\n\n\n## Live Demo\n[Demo](https://rwu823.github.io/react-hi-text)\n\n## Installation\n```sh\nnpm install react-hi-text --save\n```\n\n## Examples\n\nReact highlight text bundle with `UMD` mode, if you don't use any module loader It will exports `ReactHiText` as global variable.\n\nwith script tag\n```html\n\u003cscript src=\"assets/react.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"assets/react-hi-text.js\"\u003e\u003c/script\u003e\n\n```\n\nWith Module:\n```js\nvar React = require('react')\nvar HiText = require('react-hi-text')\n\nvar App  = React.createClass({\n\trender(){\n\t\treturn (\n\t\t\t\u003cdiv id=\"app\"\u003e\n\t\t\t\t\u003cHiText hi=\"h\"\u003e\n\t\t\t\t\tHello highlight text\n\t\t\t\t\u003c/HiText\u003e\n\t\t\t\u003c/div\u003e\n\t\t)\n\t}\n})\n\nReact.render(\u003cApp/\u003e, document.body)\n```\noutput:\n```html\n\u003cdiv id=\"app\"\u003e\n\t\u003cspan class=\"highlight\"\u003eH\u003c/span\u003eello \u003cspan class=\"highlight\"\u003eh\u003c/span\u003eig\u003cspan class=\"highlight\"\u003eh\u003c/span\u003elig\u003cspan class=\"highlight\"\u003eh\u003c/span\u003et text\n\u003c/div\u003e\n```\n\n## Props\n### hi\nSet highlight with a word.\n\n### case-sensitive\nMatch word with case sensitive. default is `false`.\n\n### className\nset class name. default  is `highlight`.\n\n## Method\n### clean()\nClear all highlights.\n\n### hasMatched  \nCheck whether or not match any words.\n\n## Known issue\nCross tag highlight issue:\n\ne.g.\n```html\n\u003cHiText hi=\"javascript\"\u003e\n\t\u003cb\u003eJava\u003c/b\u003eScript\n\u003c/HiText\u003e\n```\nexpect output:\n```html\n\u003cspan class=\"highlight\"\u003e\u003cb\u003eJava\u003c/b\u003eScript\u003c/span\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwu823%2Freact-hi-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwu823%2Freact-hi-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwu823%2Freact-hi-text/lists"}