Closed aro closed 6 years ago
Expected format:
{
"css": ["assets/styles/styles.css"],
"styles": [{
"name": "editor-style-raw",
"type": "style",
"displayName": "Unprocessed raw image"
}, {
"name": "editor-align-justify",
"type": "alignment",
"displayName": "Justify",
"requires": {
"name": "editor-width-auto",
"displayName": "Auto (100%)"
}
}, {
"name": "editor-align-left",
"type": "alignment",
"displayName": "Align Left",
"requires": {
"name": "editor-width-auto",
"displayName": "Auto (40%)"
}
}, {
"name": "editor-align-center",
"type": "alignment",
"displayName": "Center",
"requires": {
"name": "editor-width-auto",
"displayName": "Auto (60%)"
}
}, {
"name": "editor-align-right",
"type": "alignment",
"displayName": "Align Right",
"requires": {
"name": "editor-width-auto",
"displayName": "Auto (40%)"
}
}, {
"name": "editor-width-auto",
"type": "width",
"displayName": "Auto"
}, {
"name": "editor-width-actual",
"type": "width",
"displayName": "Actual"
}, {
"name": "editor-width-custom",
"type": "width",
"displayName": "Custom"
}, {
"name": "editor-style-cinema",
"type": "style",
"displayName": "Cinema",
"params": {
"scale": "21:9"
}
}]
}
Added a new url parameter in the config passed to main.html: stylesUrl
To get the styles for a content, make a POST request to that URL passing one parameter: contentId
We need an admin endpoint which will be used to fetch the list of image styles (https://github.com/enonic/xp/issues/6617, https://github.com/enonic/xp/issues/6618).
<image>
elementsname
anddisplayName
(optional)) -- params (object)