Skip to content

Commit

Permalink
fix: address CR comments
Browse files Browse the repository at this point in the history
- jira: SITES-21286
  • Loading branch information
irenelagno committed Apr 25, 2024
1 parent 6b9d951 commit 1986906
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions src/pages/services/aem-universal-editor/api/commons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ contributors:

Understand the fundamentals required to develop an extension for the Universal Editor.

## Extension Point

Universal editor has an `universal-editor/ui/1` [extension point](https://developer.adobe.com/app-builder/docs/guides/extensions/) that allows you to extend its functionality.
To declare it to be used by your extension, you need to add the following configuration to your `app.config.yaml` at the
root of your extension:

```yaml
extensions:
universal-editor/ui/1:
$include: src/universal-editor-ui-1/ext.config.yaml
```
Here is an example of `ext.config.yaml` file:

```yaml
operations:
view:
- type: web
impl: index.html
actions: actions
web: web-src
```

## Extension Registration

Interaction between UI Extension and Universal Editor starts with the initialization process that includes extension's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default App
```js
export default () => {
const [isLoaded, setIsLoaded] = useState(true);
const [isLoading, setIsLoading] = useState(true);
const [connection, setConnection] = useState();
const [model, setModel] = useState();
const [value, setValue] = useState();
Expand All @@ -112,7 +112,7 @@ export default () => {
setError(await connection.host.field.getError());
// get field validation state
setValidationState(await connection.host.field.getValidationState());
setIsLoaded(false);
setIsLoading(false);
};
init().catch((e) =>
console.log("Extension got the error during initialization:", e)
Expand All @@ -126,7 +126,7 @@ export default () => {

return (
<Provider theme={lightTheme} colorScheme="light">
{!isLoaded ? (
{!isLoading ? (
<>
Content generated by the extension Renderer#{rendererId}
<Flex direction="column" gap="size-65" marginBottom="size-100">
Expand Down

0 comments on commit 1986906

Please sign in to comment.