fromholdio / silverstripe-plain-text
Installs: 37
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- silverstripe/framework: ~4.13 || ~5.0
This package is auto-updated.
Last update: 2024-12-04 06:41:18 UTC
README
Takes a Data Object (most often a Page) and, using the configuration you set, converts the content of the Data Object to plain text, and saves into ContentPlain field.
For example, with the right configuration, the ContentPlain field will contain a plain text version of the main content of a Page, with all shortcodes replaced with their content, all HTML tags removed/replaced, derived from either or both of the page's Content field and/or the visible Elements inside any relevant ElementalAreas.
This module can be used in conjunction with fromholdio/silverstripe-text-statistics, which can then use the ContentPlain field to calculate statistics on the content, such as word count, reading time, readability scores/standards, etc.
Alternatively or additionally, this single plain text field can be used for fast full-text searching of the content; and/or for deriving a summary of the content for use in search results, metadata, etc.
Requires Silverstripe 5+ (should work with 4.x but untested).
Docs and examples of configurations to achieve the above to come.