Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/pages/guides/getting_started/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ Manifest updates

Any changes to the `manifest.json` will _require a manual reload of your add-on_. The **Add-on Development** panel will indicate this in the log messages, and the **Refresh** button can be used to reload the add-on directly within Adobe Express.

<InlineAlert slots="text" variant="info"/>

**📦 Working with SDK Constants:** As you build more complex add-ons, you'll use SDK constants like `Range`, `RenditionFormat`, and `SupportedMimeTypes`. These constants use different import patterns - some require named imports while others support multiple approaches. See the [import patterns guide](../../references/addonsdk/addonsdk-constants.md#import-patterns) for complete details.

<details>
<summary>Click to see the screenshot</summary>

Expand Down
4 changes: 4 additions & 0 deletions src/pages/guides/learn/how_to/create_renditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ Renditions are created via the [`createRendition()`](../../../references/addonsd
1. [`renditionOptions`](../../../references/addonsdk/app-document.md#renditionoptions): controls the page range that is meant to be exported and the file format (jpg, png, mp4, pdf, and pptx).
2. [`renditionIntent`](../../../references/addonsdk/addonsdk-constants.md) constant (optional): controls the intent of the exported content (preview, export, print).

<InlineAlert slots="text" variant="info"/>

**SDK Constants Import:** This guide uses several SDK constants like `Range`, `RenditionFormat`, and `RenditionIntent`. These constants support dual access (both named imports and `addOnUISdk.constants.*`). See the [constants import patterns guide](../../../references/addonsdk/addonsdk-constants.md#import-patterns) for details on importing SDK constants correctly.

## Check export permissions

The `exportAllowed()` method determines whether the current document can be exported based on its review status in collaborative workflows. This applies mainly to [enterprise customers using Adobe Express's review and approval features](https://business.adobe.com/products/workfront/integrations/express.html), where documents may be restricted from export until approved by designated reviewers.
Expand Down
55 changes: 55 additions & 0 deletions src/pages/guides/learn/how_to/group_elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ To create a Group, you can use the [`editor.createGroup()`](../../../references/

### Example

<CodeBlock slots="heading, code" repeat="2" languages="JavaScript, TypeScript" />

#### JavaScript

```js
// sandbox/code.js
import { editor } from "express-document-sdk";
Expand All @@ -78,6 +82,32 @@ greetingsGroup.children.append(greeting, saluto);
editor.context.insertionParent.children.append(greetingsGroup);
```

#### TypeScript

```ts
// sandbox/code.js
import { editor, StandaloneTextNode, GroupNode, ContainerNode } from "express-document-sdk";

// Create some Text
const greeting: StandaloneTextNode = editor.createText("Hiya!");
greeting.translation = { x: 100, y: 50 };

// Create some other Text
const saluto: StandaloneTextNode = editor.createText("Ciao!");
saluto.translation = { x: 100, y: 150 };

// Create a Group 👈
const greetingsGroup: GroupNode = editor.createGroup();
greetingsGroup.translation = { x: 100, y: 100 };

// Append the Text nodes to the Group 👈
greetingsGroup.children.append(greeting, saluto);

// Append the Group to the page 👈
const insertionParent: ContainerNode = editor.context.insertionParent;
insertionParent.children.append(greetingsGroup);
```

<InlineAlert variant="info" slots="header, text, text1" />

Group append order
Expand All @@ -92,6 +122,10 @@ Groups can be nested, meaning that you can have a Group inside another Group; ju

### Example

<CodeBlock slots="heading, code" repeat="2" languages="JavaScript, TypeScript" />

#### JavaScript

```js
// sandbox/code.js

Expand All @@ -111,6 +145,27 @@ outerGroup.children.append(innerGroup, salutation);
editor.context.insertionParent.children.append(outerGroup);
```

#### TypeScript

```ts
// sandbox/code.js

// Create three different Text nodes
const greeting: StandaloneTextNode = editor.createText("Hiya!");
const saluto: StandaloneTextNode = editor.createText("Ciao!");
const salutation: StandaloneTextNode = editor.createText("Salut!");

// Create an inner Group with the first two Text nodes
const innerGroup: GroupNode = editor.createGroup();
innerGroup.children.append(greeting, saluto);

// Create an outer Group with the inner Group and the third Text node
const outerGroup: GroupNode = editor.createGroup();
outerGroup.children.append(innerGroup, salutation);

editor.context.insertionParent.children.append(outerGroup);
```

This code results in the following grouping:

```txt
Expand Down
4 changes: 4 additions & 0 deletions src/pages/guides/learn/how_to/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ We're constantly adding new how-tos, so make sure to check back often. If you're
- [Use PDF and PowerPoint](./use_pdf_powerpoint.md)
- [Group Elements](./group_elements.md)
- [Position Elements](./position_elements.md)
- [Selection Events and Methods](./selection_events.md)
- Use Metadata
- [Document Metadata](./document_metadata.md)
- [Page Metadata](./page_metadata.md)
- [Manage Pages](./manage_pages.md)
- [Element Metadata](./element_metadata.md)
- Exporting & Output
- [Create Renditions](./create_renditions.md)
Expand All @@ -78,8 +80,10 @@ We're constantly adding new how-tos, so make sure to check back often. If you're
| | [Use PDF and PowerPoint](./use_pdf_powerpoint.md) |
| | [Group Elements](./group_elements.md) |
| | [Position Elements](./position_elements.md) |
| | [Selection Events and Methods](./selection_events.md) |
| Use Metadata | [Document Metadata](./document_metadata.md) |
| | [Page Metadata](./page_metadata.md) |
| | [Manage Pages](./manage_pages.md) |
| | [Element Metadata](./element_metadata.md) |
| Exporting & Output | [Create Renditions](./create_renditions.md) |
| | [Manage with Premium Content](./premium_content.md) |
Expand Down
Loading