configureAsReadOnly

How to get configureAsReadOnly

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

Type: Function

Configures elements matching the selector as read only. Children of read only elements may not be altered in any way.

To allow annotations in read only elements, the allowAnnotations property on the options object can be set to true. When this property is not set or is set to false, annotations in the configured element(s) can not be added edited or removed.

Note that elements configured as read only can still be removed or replaced, unless they are a descendant of another read only element themselves.

Note that this configuration function should be used in addition to a configuration function. This function does not replace any other configureAs* configuration function.

Arguments

# Name Type Description
1. sxModule SxModule
2. selector XPathTest

Selector returning the nodes to be configured as read only.

3. [options] Object

An options object.

  Members

Members

Name Type Description
allowAnnotations Boolean

Set to true to allow adding, editing and removing annotations in the configured element(s).


  Default value
false