Hello everyone,
I have a question in regard to the MacroConfiguration in combination with the useConfig-hook.
Currently the MacroConfigurations are very useful to get user input for a macro.
Is the other way around possible, to write values from the app-code itself inside these MacroConfig-Form-Elements using the useConfig-hook?
Exemplary use case: (Confluence)
I would like to give the users a CheckboxGroup inside a ModalDialog. If they choose a specific Checkbox, more MacroConfig-compatible components are dynamically added, with predefined values depending on the chosen Checkbox.
I would like to write those component-values inside the MacroConfiguration so I can access them anytime inside my code with the useConfig-hook and the user does not have to use the edit-modus of the confluence page.
As the MacroConfig-documentation notes, it is possible to access and modify values since the configuration data is stored in plain text.
For this to work without direct access via the useConfig-hook, I should access the XML, find the current macro, search for the correct MacroConfig component and change it’s value?
This would lead to a new page version everytime some values are changed, or am I missing something?
Is there a more straightforward way of accomplishing this goal? Or am I overlooking something?
Thank you for reading and for any kind of input on this matter
Philipp Nolte