createGroupedChunkOutputProcessor

Type: Function

How to get createGroupedChunkOutputProcessor?

JavaScript

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

Generic Chunk to node approach to inserting (a set of) Chunk(s) into the DOM

Example for the constructFunctions:

JavaScript

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

Both constructor functions are optional, we can either create a single container of a group of chunks, or create an element for each individual chunk, or both

Arguments

  1. label

    (Required)

  2. constructContainerElement

    (Required)

    Type: Function

    A factory function for the outer element, created only once for a set of consecutive similar chunks

  3. constructChildElement

    (Required)

    Type: Function

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

  4. matchingLabels

    (Required)

    Type: Array<String>

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

Returns

The actual processor