createChunkOutputProcessor

How to get createChunkOutputProcessor

import createChunkOutputProcessor from 'fontoxml-pipelined-importer/src/createChunkOutputProcessor.js'

Type: Function

Generic Chunk to node approach to inserting a single chunk into the Dom

Example for the constructFunction:

function (blueprint, insertionPosition, document) {
    var newElement = namespaceManager.createElement(document, 'someElement');
    insertionPosition.setAtBegin(newElement);
    return newElement;
}

The insertionPosition is placed at the position where the child will be inserted. This can be used to keep track of context

Arguments

# Name Type Description
1. label
2. constructChildElement Function

A factory function for the inner element, the inner element is created for ever consecutive chunk matching to the label


  Arguments
# Name Type Description
1. blueprint
2. Position
3. Document
  Returns

Type: Element

3. matchingLabels Array<String>

The labels which will be attempted to be processed by this outputProcessor

Returns

Type: PipelinedImporterOutputProcessor

The actual processor

Was this page helpful?