diff --git a/README.md b/README.md index 3c67aad..c387a81 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,28 @@ You can import this plugin into your project as follows: If you want to import the plugin with your webpack build you can do it by: ```js -import initReadMoreReadLess from "read-more-read-less/src/js/init"; -initReadMoreReadLess(); +import "read-more-read-less"; ``` You should look at `sass-loader` implementation on [webpack documentation](https://webpack.js.org/loaders/sass-loader/). +### Refresh + +You can process new dynamic contents by calling: + +``` +window.processReadMoreReadLess(); +``` + +or in Webpack way: + +```js +import processReadMoreReadLess from "read-more-read-less/src/js/utils/process"; +processReadMoreReadLess(); +``` + +Only news ones will be processed. + ## Examples ### Works inline diff --git a/package.json b/package.json index bfb983a..e016fe8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "read-more-read-less", - "version": "1.0.12", + "version": "1.0.13", "description": "Zero dependency read more link implementation to any kind of content.", "main": "src/js/index.js", "scripts": {