Type: Function

How to get configureAsTableElements?


import configureAsTableElements from 'fontoxml-table-flow/src/configureAsTableElements.js'

Configures the elements used in a table. This function is limited to configuring only those elements that define the tables structure. Any elements like XHTML caption and TEI head need to be configured separately.

Cells will be configured as Frame when their default text container is set. Else, cells will be configured as FrameWithBlock.

The cell element menu button widgets are added based on the existence of contextual operations on cell level. Make sure that only cell-specific operations are added to the cell widget, so that users are only given options relevant to them. Example on how you can add this element menu on the widget:


   configureProperties(sxModule, 'self::cell', {
	contextualOperations: [
		{ name: 'contextual-set-total-cell', hideIn: ['context-menu'] }

Example usage for the table widgets:


		table: {
			localName: 'table'
		cell: {
			defaultTextContainer: 'p'
		columnBefore: [
			createIconWidget('clock-o', {
				clickOperation: 'lcTime-value-edit',
				tooltipContent: 'Click here to edit the duration'
		rowBefore: [
			createIconWidget('dot-circle-o', {
				clickOperation: 'do-nothing'
		showInsertionWidget: true,
		showHighlightingWidget: true,
		isCollapsibleQuery: 'false()',
		isInitiallyCollapsedQuery: 'true()',
		columnWidgetMenuOperations: [{ name: 'column-delete-at-index' }],
			{ contents: [{ name: 'do-nothing' }] },
				contents: [
 					{ name: 'contextual-row-insert' },
					{ name: 'contextual-row-after-insert' }
			{ contents: [{ name: 'contextual-row-delete' }]	}

Tables can also be configured to be collapsible. Refer to our guide to learn more.


  1. sxModule


    Type: Object

    The sxModule to use for configuring the elements.

  2. options


    Type: Object

    Configuration options.


  3. tableDefinition


    The table definition to use.