Details
-
Suggestion
-
Resolution: Fixed
-
None
-
None
Description
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
Currently we have no way to hook into the Macro Property Panel creation which is based on the macro descriptor.
<xhtml-macro key="status" name="status" class="com.atlassian.confluence.plugins.status.StatusMacro" icon="/download/resources/com.atlassian.confluence.plugins.status-macro/images/status-icon.png"> ... <property-panel> <spacer/> <button id="subtle" label="Subtle"/> <spacer/> <button id="Grey" label=""/> <button id="Red" label=""/> <button id="Yellow" label=""/> <button id="Green" label=""/> <button id="Blue" label=""/> <button id="Brown" label=""/> <spacer/> </property-panel> </xhtml-macro>
A use case would be to be able to add additional CSS classes for a button in order to steer its visual appearance, e.g. the selected class. Since we require to wire up the code via JS anyway, the easiest way would be to allow the registration of callbacks able to modify the buttons before they get attached to the DOM. This is an easier to implement and flexible approach than changing the descriptor to allow additional CSS classes on the property-panel elements, as this would be static by default and I'd assume that for the majority of use cases you'd need to assert a state at runtime.
Attachments
Issue Links
- relates to
-
CONFCLOUD-28360 As a plugin developer, I want to be able to modify the generated property panel after creation
- Closed