Creating trait with Style Manager property UI
Question
I have a component using the background-url Style Manager property:
editor.DomComponents.addType('mj-hero', {
model: {
defaults: {
// ...
stylable: ['background-url'],
},
},
});
I would like to reuse this UI that is shown in the Style Manager for a background URL trait that shows up under "Settings":

Is it possible to make a Style Manager property behave like a trait and show up in the "Settings" section, or would I have to create a new trait with this UI?
Thanks.
Answers (2)
Unfortunately, it's not yet possible, but there is a plan to add soon a new UI module that should allow the reuse of UI elements
:+1: Thank you!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2777
[QUESTION] How to update styles in Style Manager
Hello. I created custom component where I set backgraound-image via custom asset manager Custom block code: Command which I run to set new...
Issue #2614
[QUESTION] Recursive view update of custom component
Hi, I have defined a custom type like: I want to keep the customTag in my model and show the content (HTML) in the view. However, in the co...
Issue #2137
[help needed] Can someone explain property.layers of the style manager? [pls read description]
I would like to code the entire background layers property but this time using 'background' instead of background-image so it doesn't mess...
Issue #2549
[QUESTION] Update component view on property change
Hi everyone, I'm trying to create a component that will update it's view based on a property value My approach is bassed on #1227 and on th...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.