Skip to the content.

Tag Extractor Plugin

Back to Index

Extracts content between HTML-like tags with optional attributes.

import { TagExtractorPlugin } from 'simple-docs-scraper/extractors';

const extractor = new TagExtractorPlugin({
  tag: 'docs',
  searchAndReplace: '%docs%',
  defaultText: 'No documentation found'
});

Configuration:

Example usage:

<!-- Input -->
<docs>
This is documentation content.
</docs>

<!-- Output -->
This is documentation content.