Hi everybody,
I am writing a Confluence Macro and I would like to get the User Input of the input field “Page”, type “confluence-content”.
My xhtml-macro definition is:
<xhtml-macro name=“select-child-page”
title=“Link child page”
class=“com.alma.confluence.plugin.macro.ChildPageLink”
key="select-child-page">
<category name="development"/>
<parameters>
<parameter name="Page" type="confluence-content" required="true">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="true"/>
</parameter>
<parameter name="ChildPage" type="enum" required="false">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="true"/>
</parameter>
</parameters>
</xhtml-macro>
And the javascript:
ChildPageLink.prototype.fields = {
“confluence-content”: {
“Page”: function (param, options) {
console.log(“Page”);
}
},
“enum”: {
“ChildPage”: function (param, options) {
console.log(“Child Page”);
$('#macro-param-Page').change(function () {
var page = AJS.$('input#macro-param-Page');
console.log(page);
});
}
}
}
Could you help me in this topic? How can I read out the user input of the field “Page” (confluence-content)?
Thank you in advance,
Eva