New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-format-text

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-format-text

Simple link and newline text formatting for react

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
613
decreased by-5.69%
Maintainers
2
Weekly downloads
 
Created
Source

react-format-text

React component for formatting newlines and links. See the live demo.

npm install react-format-text

Usage

Newlines are converted to <br> elements and words looking like URLs are replaced with appropriate <a> elements. By default all absolute links have target set to _blank and rel to noopener noreferrer. It's possible to override this by passing the target and rel property to the component.

var React = require('react');
var Text = require('react-format-text');

var App = React.createClass({
	render: function() {
		return <Text>{'Hello\nhttp://example.com'}</Text>;
	}
});

Keywords

FAQs

Package last updated on 23 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc