createChunkOutputProcessor

Type: Function

How to get createChunkOutputProcessor?

JavaScript

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

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

Example for the constructFunction:

JavaScript

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

  1. label

    (Required)

  2. constructChildElement

    (Required)

    Type: Function

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

    Arguments

    Returns

  3. matchingLabels

    (Required)

    Type: Array<String>

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

Returns

The actual processor