I’m testing the functionalities in confluence server and the possibility of creating a macro using spring boot.
Till now i created a simple macro connected to an endpoint and this macro is supposed to be used in wiki when i type /maps it open an editor as i specified in my atlassian connect (will include it below) and in the editor i’m serving my Front end calling an endpoint /submit-prompt where it loads the html and the js.
My front is just a button that fetches string text and display it in a text area, now upon closing the editor or clicking insert i need to take the data and place it in wiki, but i’m not able to do that.
my atlassian-connect.json
"key": "${addon.key}",
"name": "AI for Confluence",
"description": "AI for Confluence",
"baseUrl": "${addon.base-url}${server.servlet.contextPath}",
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed"
},
"scopes": [
"READ",
"WRITE"
],
"apiMigrations": {
"signed-install": true
},
"modules": {
"dynamicContentMacros": [
{
"width": "200px",
"height": "200px",
"url": "/render-map?pageTitle={page.title}",
"description": {
"value": "Shows a configurable map"
},
"icon": {
"width": 80,
"height": 80,
"url": "/maps/icon.png"
},
"documentation": {
"url": "http://docs.example.com/addons/maps"
},
"categories": [
"visuals"
],
"outputType": "block",
"bodyType": "none",
"aliases": [
"map"
],
"featured": true,
"parameters": [
{
"identifier": "view",
"name": {
"value": "Map View"
},
"description": {
"value": "Allows switching between view types"
},
"type": "enum",
"required": true,
"multiple": false,
"defaultValue": "Map",
"values": [
"Map",
"Satellite"
],
"hidden": false,
"indexing": {
"enabled": true
}
}
],
"autoconvert": {
"urlParameter": "url",
"matchers": [
{
"pattern": "https://www.example.com/maps/{}/{}"
},
{
"pattern": "https://www.example.com/map-editor/{}"
}
]
},
"editor": {
"url": "/submit-prompt",
"editTitle": {
"value": "Edit Map"
},
"insertTitle": {
"value": "Insert Map"
}
},
"name": {
"value": "Maps"
},
"key": "dynamic-macro-example"
}
]
}
}
this is a screenshot of the macro
Any help on how to achieve that ? i’m using spring boot to expose my endpoints and serve data and the atlassian-connect.json.
Thanks in advance