react-highlighter

WebJar for react-highlighter

Лицензия

Лицензия

MIT
Категории

Категории

React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

react-highlighter
Последняя версия

Последняя версия

0.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

react-highlighter
WebJar for react-highlighter
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/helior/react-highlighter

Скачать react-highlighter

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-highlighter/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-highlighter</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-highlighter/
implementation 'org.webjars.npm:react-highlighter:0.4.0'
// https://jarcasting.com/artifacts/org.webjars.npm/react-highlighter/
implementation ("org.webjars.npm:react-highlighter:0.4.0")
'org.webjars.npm:react-highlighter:jar:0.4.0'
<dependency org="org.webjars.npm" name="react-highlighter" rev="0.4.0">
  <artifact name="react-highlighter" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-highlighter', version='0.4.0')
)
libraryDependencies += "org.webjars.npm" % "react-highlighter" % "0.4.0"
[org.webjars.npm/react-highlighter "0.4.0"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : blacklist jar [1.1.2,2)
org.webjars.npm : create-react-class jar [15.5.2,16)
org.webjars.npm : escape-string-regexp jar [1.0.5,2)
org.webjars.npm : prop-types jar [15.5.8,16)

Модули Проекта

Данный проект не имеет модулей.

npm version Build Status Coverage Status

react-highlighter

Highlight select fragments of a string using an HTML element and/or a class.

Installation

npm install react-highlighter --save

Usage

var Highlight = require('react-highlighter');

<Highlight search="brown">The quick brown fox jumps over the lazy dog</Highlight>

Props

  • search: The string of text (or Regular Expression) to highlight
  • caseSensitive: Determine whether string matching should be case-sensitive. Not applicable to regular expression searches. Defaults to false
  • ignoreDiacritics: Determine whether string matching should ignore diacritics. Defaults to false
  • diacriticsBlacklist: These chars are treated like characters that don't have any diacritics. Not applicable ignoreDiacritics is false. Defaults to none
  • matchElement: HTML tag name to wrap around highlighted text. Defaults to mark
  • matchClass: HTML class to wrap around highlighted text. Defaults to highlight
  • matchStyle: Custom style for the match element around highlighted text.

Development

Testing

Using Mocha/Chai/React.addons.TestUtils for testing.

npm test

Code Coverage

Generate a report using Istanbul to make sure your tests are touching everything! FYI, Travis will fail the build if there isn't at least 90% of statement coverage and 100% function coverage.

npm run coverage

Coveralls.io integration requires that the environment variable COVERALLS_REPO_TOKEN is set.

Версии библиотеки

Версия
0.4.0
0.3.3