Content
In the Apps SDK, the term content refers to the different types of media or text that may exist in a user's design, such as image content or richtext content.
The important thing to understand is that "content" is not synonymous with "element". For example, an image element is not the same thing as image content. This distinction matters because there are differences in how apps can operate on content versus how apps can operate on elements.
If you're not aware of these differences, the behavior of the Apps SDK may be confusing.
Content vs. elements
An element is a container with a set of dimensions, while content is the underlying media or text that exists within that container. For example, image elements contain image content and video elements contain video content.
Content, however, does not always exist within an element.
For example, a page background may contain image content, but a page background is not an image element. Similarly, table cells may have text content, but table cells are not text elements.
Content types
Apps can interact with the following types of content:
- Image content
- Text content, as plaintext or richtext
- Video content
The way in which an app can interact with content depends on the type of content. The exact details are explained on the linked pages.
Content querying
Apps can query the content in a user's design. This allows the app to read and update the content of a design without needing to understand or traverse the structure of the design. To learn more, see Querying content.
Content selection
Apps can listen for the selection of content in a user's design. This allows the app to read and update the selected content, which is appropriate for more targeted operations. To learn more, see Reading elements.
Element traversal
Apps can traverse the elements in a user's design. This allows the app to read and update the content of the elements, which means the app can understand the context in which the content is rendered. To learn more, see Design Editing.