createInnerJsonMl

Type: Function

The createInnerJsonMl callback can be used to create the JsonML fragment when the node is rendered.

Other

configureAsObject(sxModule, 'self::pdf-reference', 'PDF reference', {
    createInnerJsonMl: (sourceNode) => [
        'span',
        {
            class: 'custom-pdf-renderer-template',
        },
        'Click to view PDF'
    ]
})

Arguments

  1. sourceNode

    (Required)

    Type: NodeProxy

  2. renderer

    (Required)

    The renderer provides ways to render other nodes in your document inside of an object or widget.

Returns

Type: JsonML

It is advised not to use iframes inside views through createInnerJsonMl as it can lead to some known issues