From 2fea3acd87b82f53739270662abf6eb16bb0759d Mon Sep 17 00:00:00 2001 From: Iryna Lagno Date: Fri, 3 May 2024 16:26:59 -0500 Subject: [PATCH] Universal editor doc (#77) * - update universal editor docs * - update universal editor docs * fix CR --- .../services/aem-cf-console-admin/api/modal/index.md | 4 ---- src/pages/services/aem-cf-editor/api/modal/index.md | 4 ---- .../services/aem-universal-editor/api/commons/index.md | 2 +- .../services/aem-universal-editor/api/modal/index.md | 8 ++------ 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/pages/services/aem-cf-console-admin/api/modal/index.md b/src/pages/services/aem-cf-console-admin/api/modal/index.md index 8446fb53..7ce4ef1f 100644 --- a/src/pages/services/aem-cf-console-admin/api/modal/index.md +++ b/src/pages/services/aem-cf-console-admin/api/modal/index.md @@ -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` - -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. diff --git a/src/pages/services/aem-cf-editor/api/modal/index.md b/src/pages/services/aem-cf-editor/api/modal/index.md index 66f8c319..4ff119aa 100644 --- a/src/pages/services/aem-cf-editor/api/modal/index.md +++ b/src/pages/services/aem-cf-editor/api/modal/index.md @@ -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` - -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. diff --git a/src/pages/services/aem-universal-editor/api/commons/index.md b/src/pages/services/aem-universal-editor/api/commons/index.md index ab385631..9371e5cc 100644 --- a/src/pages/services/aem-universal-editor/api/commons/index.md +++ b/src/pages/services/aem-universal-editor/api/commons/index.md @@ -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(); diff --git a/src/pages/services/aem-universal-editor/api/modal/index.md b/src/pages/services/aem-universal-editor/api/modal/index.md index d1719aca..d8a41c55 100644 --- a/src/pages/services/aem-universal-editor/api/modal/index.md +++ b/src/pages/services/aem-universal-editor/api/modal/index.md @@ -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, @@ -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` - -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.