Hey everyone,
I have a plugin that creates a new page via /rest/api/content. This is the body data:
const bodyData = `{
"title": "${newPageTitle.value}",
"type": "page",
"space": {
"key": "${context.confluence.space.key}"
},
"ancestors": [
{
"id": "${context.confluence.content.id}"
}
],
"body": {
"storage": {
"value": "<some html here whatever goes>",
"representation": "storage"
}
}
}`;
The problem here is that the page created this way has a different edit URL which in turn causes the “old” editor to be rendered which doesn’t provide the best user experience. The edit links are as follows:
- confluence created page: https://xxxxxxx.atlassian.net/wiki/spaces/NU/pages/edit-v2/135036930
- API created page: https://xxxxxxx.atlassian.net/wiki/spaces/NU/pages/edit/149192716?draftId=149192721&draftShareId=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I’ve redacted some of the values (don’t know if it’s private :D).
My first question is what is the difference between types of body (storage, view, …)? And second, how to get the same editing type? Do I have to add a parameter or something like that?
Thanks in advance