Open MaxTru opened 3 years ago
We recently implemented something similar in properties-panel-next
.
PluginRoot
)useService
hook to easily fetch didi like servicesfunction MyPlugin(props) {
const elementTemplates = useService('elementTemplates');
// do stuff ...
}
Is your feature request related to a problem? Please describe.
In the current situation, there is no clear best-practice way of how to access the current
modeler
context from within a plugin.Example: the
ElementTemplatesModal
requires access to theelementTemplates
service via the activemodeler
instance of the active tab. There is no clear apparent way of how to do that (see analysis on this board: https://miro.com/app/board/o9J_lTaSpoI=/).This leads to:
Describe the solution you'd like
There should be a best-practice public API mechanism to get access to the current modeler instance from within a Camunda Modeler Plugin / React component.
We need to:
Describe alternatives you've considered
Additional context
See https://miro.com/app/board/o9J_lTaSpoI=/