Skip to content

Commit

Permalink
Universal editor doc (#77)
Browse files Browse the repository at this point in the history
* - update universal editor docs

* - update universal editor docs
* fix CR
  • Loading branch information
irenelagno authored May 3, 2024
1 parent 20c24aa commit 2fea3ac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/pages/services/aem-cf-console-admin/api/modal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ This API is returned to the GuestServer and also shared with the modal that load

Modify the currently displaying modal. GuestUI frames running inside the modal may call this method to change their dimensions, or to change other parameters.

#### `modal.close(): Promise<void>`

Close the modal.

### Resizing

When `height` and/or `width` are set to `"auto"`, the modal will attempt to resize whenever the displayed page changes size. This is to make the content of the iframe behave, as much as possible, like they're part of the content flow of the host application.
Expand Down
4 changes: 0 additions & 4 deletions src/pages/services/aem-cf-editor/api/modal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ This API is returned to the GuestServer and also shared with the modal that load
Modify the currently displaying modal. GuestUI frames running inside the modal may call this method to change their dimensions, or to change other parameters.
#### `modal.close(): Promise<void>`
Close the modal.
### Resizing
When `height` and/or `width` are set to `"auto"`, the modal will attempt to resize whenever the displayed page changes size. This is to make the content of the iframe behave, as much as possible, like they're part of the content flow of the host application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ In cases where a UI Extension manages data or sends data to a remote service, th
```js
import { attach } from "@adobe/uix-guest";
const guestConnection = await attach({ id: "extension-id" });
const connection = await attach({ id: "extension-id" });
const state = await connection.host.editorState.get();
const token = await connection.sharedContext.get("token");
const model = await connection.host.field.getModel();
Expand Down
8 changes: 2 additions & 6 deletions src/pages/services/aem-universal-editor/api/modal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function ExtensionRegistration() {
label: 'Modal Dialog',
icon: 'PublishSchedule',
onClick: async () => {
console.log('Button has been pressed.');
url: "/index.html#/modal", // absolute or relative path
console.log('Button has been pressed.');
const url = "/index.html#/modal"; // absolute or relative path
guestConnection.host.modal.showUrl({
title: 'Modal Dialog: ',
url,
Expand Down Expand Up @@ -151,10 +151,6 @@ This API is returned to the GuestServer and also shared with the modal that load

Modify the currently displaying modal. GuestUI frames running inside the modal may call this method to change their dimensions, or to change other parameters.

#### `modal.close(): Promise<void>`

Close the modal.

### Resizing

When `height` and/or `width` are set to `"auto"`, the modal will attempt to resize whenever the displayed page changes size. This is to make the content of the iframe behave, as much as possible, like they're part of the content flow of the host application.
Expand Down

0 comments on commit 2fea3ac

Please sign in to comment.