configureAsSheetFrame

Type: Function

How to get configureAsSheetFrame?

JavaScript

import configureAsSheetFrame from 'fontoxml-families/src/configureAsSheetFrame.js'

Sheet frames are meant for elements that represent a document.

They are displayed as a sheet of ‘paper’. The active sheet receives a colored border to indicate the location of the cursor. Sheet frames have a fixed width, as repainting the entire document after a resize is unacceptably slow for large documents. On narrower viewports, the documents may slide behind the open drawer and a horizontal scrollbar will appear. The horizontal margins of the page become wider on viewports of at least 1696 pixels wide.

Pressing Enter, Tab, Backspace, or Delete has no effect on sheet frames. Additionally, it is not yet possible to navigate between sheet frames using the arrow keys.

Use this for elements that represent a document, e.g. DITA <topic> and its specializations.

If the single-document-hierarchy add-on is used, the sheetframes should be the 'roots' of the new hierarchy.

Sheetframes are 'closed' in terms of cursor navigation. They do not allow the cursor to exit nor enter it by pressing the arrow keys or when using operations like set-cursor-to-first-text-position.

The following visualization options are visualized by this family:

  • variation

  • textAlign

The following widget areas are available:

  • blockHeaderLeft

  • blockHeaderRight

  • blockBefore

  • blockAfter

  • blockFooter

  • blockOutsideBefore

  • blockOutsideAfter

  • blockBanner

This family has a number of additional options which affect how it behaves:

  • defaultTextContainer

  • visibleChildSelectorOrNodeSpec: This option defines which children of this node will be

rendered inside this sheetframe. This can be used in conjunction with add-on/fontoxml-single-document-hierarchy to prevent rendering children that are rendered as their own hierarchy node. Not that this test should still match processing instructions, or the squiggles generated by add-on/fontoxml-annotations, add-on/fontoxml-track-changes and the likes won't be rendered.

  • sheetFrameHeaderComponentName: This option allows you to use a registered sheet frame header

React component. This can be set to "DefaultSheetFrameHeader" to use a default sheet frame header or to any name under which you've registered a custom sheet frame header component. Note: this feature is currently only designed for and supported with editors that use multiple document(-file)s. Read more about what sheet frame headers are, how they work and how to create a custom one in the guide "Configure a (custom) sheet frame header".

Arguments

  1. sxModule

    (Required)

    Type: SxModule

  2. selector

    (Required)

    Type: XPathTest

  3. markupLabel

    (Optional)

    Type: String

  4. options

    (Optional)

    Properties