I would like to add a property to store JSON type values and for which I'd like to implement my own JSON editor component. Is this possible?
Generally speaking to add a custom property with my own component in it.
I would like to add a property to store JSON type values and for which I'd like to implement my own JSON editor component. Is this possible?
Generally speaking to add a custom property with my own component in it.
Hello Brian,
You can add a custom property to a survey element and register a custom editor for this property. Please follow these steps:
Serializer.addProperty
function. Set a custom property's type
to some custom type (e.g., jsonvalue
) For more information on how to add custom properties to survey and its elements, check the following example: Add Custom Properties to the Property Grid.PropertyGridEditorCollection.register
function to register a custom component as a property grid editor:
fit
method, check if a prop.type
parameter equals a custom defined type (jsonvalue
).You can refer to the following demo: Integrate a 3rd-Party Color Picker Component. It shows how to register a custom backgroundColor
property for a survey, and how to use the Color component as a custom property editor.
Should you have any questions or require further assistance, we are always here to help.