Pass data to Universal Editor extension
There is a bunch of data-aue attributes that we can retrieve in custom Universal Edtitor extenstion. For example given html markup like this
<div class="MuiBox-root mui-ifmqwy" data-aue-resource="<resource_path>" data-aue-model="myapp-component-model" data-aue-label="Component Label" data-aue-type="component" data-aue-prop="<some_prop>"></div>We can obtain attributes values using editorState.editables obejct in custom UE extension
const editorState = await guestConnection.host.editorState.get();
let editable = editorState.editables[0];
console.log('editable: ', editable)
// outputs
{
"id": "<some_id>",
"type": "component",
"resource": "<resource_path>",
"prop": "<some_prop>",
"rect": {},
"label": "Component Label",
"parentid": "<parent_id>",
"selector": "<some_selector>",
"isComponent": true,
"model": "myapp-component-model",
"filter": "",
"component": "",
"content": "",
"children": []
}For example "prop" value comes from data-aue-prop , "type" - from data-aue-type and so on.
I've tried using data-aue-prop to pass some arbitrary data and it worked but it makes UE think this component is a Content Fragment so it becomes undeletable, unduplicatable
My actual question is - can we use data-aue-component attribute to pass some arbitrary data to extension? Actually it worked for me but this attribute is not documented anywhere so I cannot be sure it won't affect some implicit logic in future. Or if not what are the other ways to pass the data from html to the extenstion?
Everything I know about data-aue-component attribute is that it was added in Release 19352
Quote from https://experienceleague.adobe.com/
SITES-27789: Support of data attribute data-aue-component in the DOM.
