Looking to extend adaptive card designer with our own custom elements #5240
-
Hello, I've been looking into adding custom Card elements into the adaptivecard-designer. I haven't had much luck extending the card-designer, and I wanted to ask how everyone is doing it? I've looked through the source code to understand better the problem at hand (That is, being unable to add custom elements to the "Card Element" sidebar), but haven't had any luck with trying to add a custom element to the "Card Element" sidebar. The example on the Microsoft website about extensibility for the nodeJS card designer is a great example, However, That hasn't worked for me and I'm hoping to understand better how the community is implementing their custom card elements? Any help would be really great, or any links to articles about the adaptive-card extensibility as I am yet to discover any apart from Microsoft's own example, or people just reusing that same example. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@dclaux thoughts here? I know folks over at Cisco are extending the designer as well and so are folks on the Power Platform team -- I can see if i can get them added here for comment/tips |
Beta Was this translation helpful? Give feedback.
-
@JackMostert extending the designer is fairly easy, although not well documented (we'll have to fix that):
CardDesignerSurface.cardElementPeerRegistry.registerPeer(<your custom element class>, <your designer peer class>, <the toolbox category>, <the icon CSS class>);
Example: .your-icon-class-name::before {
content: "\F505";
} I hope this helps until we have better documentation (and a more straightforward way to define icons.) |
Beta Was this translation helpful? Give feedback.
@JackMostert extending the designer is fairly easy, although not well documented (we'll have to fix that):
Implement you custom element and register it with the renderer (example here, I assume you've already done that)
Implement a Designer Peer for your element. The designer peer is the bridge between your custom element and the designer. It allows you to declare which properties show up in the property sheet and the action buttons that can decorate the selection rectangle