configureAsReadOnly

Type: Function

How to get configureAsReadOnly?

JavaScript

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

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

To allow annotations in read only elements or documents, 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 family configuration function. This function does not replace any other configureAs* configuration function.

Arguments

  1. sxModule

    (Required)

    Type: SxModule

  2. selector

    (Required)

    Type: XPathTest

    Selector returning the nodes to be configured as read only.

  3. options

    (Optional)

    Type: Object

    An options object.

    Properties