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.
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)
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: