This is basically what I have right now for the settings, but only for the default size and default alignment, I use a dropdown for each. Here’s my code from the umbraco-package.json:
"settings": {
"properties": [
{
"alias": "defaultsize",
"label": "Default Size",
"description": "Choose the default header size",
"propertyEditorUiAlias": "Umb.PropertyEditorUi.Dropdown",
"weight": 200,
"config": [
{
"alias": "items",
"value": [ "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6" ]
}
]
},
{
"alias": "defaultalign",
"label": "Default Alignment",
"description": "Choose the default header alignment",
"propertyEditorUiAlias": "Umb.PropertyEditorUi.Dropdown",
"weight": 200,
"config": [
{
"alias": "items",
"value": [ "No alignment", "Align to the left", "Align to the center", "Align to the right" ]
}
]
}
],
"defaultData": [
{
"alias": "items",
"value": [
{
"name": "Heading 1",
"value": "h1"
},
{
"name": "Heading 2",
"value": "h2"
},
{
"name": "Heading 3",
"value": "h3"
},
{
"name": "Heading 4",
"value": "h4"
},
{
"name": "Heading 5",
"value": "h5"
},
{
"name": "Heading 6",
"value": "h6"
}
]
},
{
"alias": "items",
"value": [
{
"name": "No alignment",
"value": "none"
},
{
"name": "Align to the left",
"value": "text-start"
},
{
"name": "Align to the center",
"value": "text-center"
},
{
"name": "Align to the right",
"value": "text-end"
}
]
},
{
"alias": "defaultsize",
"value": "h2"
},
{
"alias": "defaultalign",
"value": "none"
}
]
}
I was looking for a way to add a custom view for the settings so that I could manipulate the look and values.
Regards,
Geoff.