Extension:TextExtracts

The TextExtracts extension provides an API with allows to retrieve plain-text or limited HTML (HTML with content for [https://github.com/wikimedia/mediawiki-extensions-TextExtracts/blob/master/extension.json#L38 some CSS classes] removed) extracts of page content.

Configuration settings

 * is an array of, .class, . , and # which will be excluded from extraction.
 * For example,  removes indented text, often used for non-templated hatnotes that are not desired in summaries.
 * [https://phabricator.wikimedia.org/diffusion/ETEX/browse/ TextExtracts.php] defines the defaults, of which the class "noexcerpt" is one - this may be added to any template to exclude it.
 * defines whether TextExtracts should provide its extracts to the os>Special:MyLanguage/Api:Opensearch| API module. The default is "false".

How can I remove content from a page preview/extract?
TextExtracts will strip any element that is marked with the class noexcerpt. This is provided by the global wgExtractsRemoveClasses.