n-content-transform
Further (opinionated) transformation of content html for Next
Purpose is to do 'on-the-fly' further transformation of content html (eg. article body, opening).
These transformations are opinionated / specific to next front end requirements and therefore not within the stylesheet transforms handled by the next-es-interface ingest process
Transforms handled include;
- Data tracking - adding to specific elements
- Images - determining presentational variant, adding placeholders, using [image service] (https://www.ft.com/__origami/service/image/v2/)
- External links - enabling non-FT links to be opened in a new tab / window
- Video - add placeholder for video and brightcove player
Usage
const contentTransform = require('ft-n-content-transform');
All transforms
let transformedContent = contentTransform.transformAll(contentHtml, *flags*);
Just image transforms
let transformedContent = contentTransform.transformImages(contentHtml, *flags*);