This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ft-n-content-transform

5.1.0 • Public • Published

Coverage Status

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*);

Dependents (0)

Package Sidebar

Install

npm i ft-n-content-transform

Weekly Downloads

9

Version

5.1.0

License

none

Unpacked Size

677 kB

Total Files

44

Last publish

Collaborators

  • robgodfrey
  • robertboulton
  • seraph2000
  • hamza.samih
  • notlee
  • emmalewis
  • aendra
  • the-ft
  • rowanmanning
  • chee
  • alexwilson