PivotModelTransformerManager

How to get PivotModelTransformerManager

ES2015+:

import PivotModelTransformerManager from 'fontoxml-pivot-model/pivotModelTransformerManager'

ES5:

define([
	'fontoxml-pivot-model/pivotModelTransformerManager'
], function (
	PivotModelTransformerManager
) {
});

Type: Class

The pivot model manager manages transformers which translates between DOM structures and pivot models.

Currently, this is used for pasting HTML to Fonto.

Methods

Name Description
registerContextualTransformer

Register a contextual transformer.

Contextual transformers can be used to influence import behavior on certain positions by only registering them of the import position matches with a certain selector.


  Arguments
# Name Type Description
1. sxModule SxModule
2. selector XPathQuery

Should be of the form ancestor::xxx if the transformer should only be triggered in the import position is under an xxx element.

3. transformerConfig Array<TransformerConfiguration>
registerTransformers

Register a part of the transformerConfiguration


  Arguments
# Name Type Description
1. sxModule sxModule
2. transformerConfig Array<TransformerConfiguration>