Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Editor: decorate block method doesn't call after block content update #11

Open
samuelecalamita opened this issue Sep 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@samuelecalamita
Copy link
Collaborator

samuelecalamita commented Sep 3, 2024

Context:
In the Universal Editor, we have a block where we rewrite the markup using JavaScript/Lit-html.

Issue:
When we update the content using the Universal Editor, the block markup is updated alongside the content. However, the loadBlock method in editor-support.ts does not function as expected. This issue occurs because the loadBlock method was modified to receive a section as a parameter instead of the block itself.

Possible optimizations/questions:

  • Adaptation of loadBlock: Should we modify the loadBlock method in editor-support.js to properly receive the section as a parameter, instead of the block?
  • why do we rewrote loadBlock to receive a section as parameter and not a block? in the doc based adobe boilerplate they also go with section as parameter but not in the xwalk boilerplate.
@samuelecalamita samuelecalamita added the bug Something isn't working label Sep 3, 2024
@samuelecalamita samuelecalamita changed the title Load Block logic Universal Editor: decorate block method doesn't call after block content update Sep 3, 2024
@mrozati
Copy link
Contributor

mrozati commented Sep 4, 2024

update after alignment with @ifahrentholz and @samuelecalamita :

  • aem.js should be handled as a 3rd party dependency. We can hook in or extend but we should not overwrite it.
  • This means we can split it in single task files but the functions must not be copied. Instead we would import the functions from the original aem.js of Adobe (mind there are two, one for doc-based and one for x-walk projects - see this dicord discussion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants