useDocumentAspect

Type: Function

How to get useDocumentAspect?

JavaScript

import useDocumentAspect from 'fontoxml-fx/src/useDocumentAspect.js'

Returns a certain aspect of the document with the given id, as set using setDocumentAspect. Will subscribe to changes to the given aspect on the given document and return the current value of the given aspect.

Use documentsManager.setDocumentAspect() to change it (usually not done in a React component).

Arguments

  1. documentId

    (Required)

    Type: String

    The id of the document to subscribe on

  2. aspectName

    (Required)

    Type: String

    The name of the aspect to subscribe on

Returns

Type: any | NULL