Package Exports
- @wordpress/autop
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wordpress/autop) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@wordpress/autop
JavaScript port of WordPress's automatic paragraph function autop and the removep reverse behavior.
Installation
Install the module
npm install @wordpress/autop --saveUsage
Import the desired function(s) from @wordpress/autop:
import { autop, removep } from '@wordpress/autop';
autop( 'my text' );
// "<p>my text</p>"
removep( '<p>my text</p>' );
// "my text"API Usage
autop( text: string ): stringremovep( text: string ): string
