The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Forge Macro

Lee Parvin
October 9, 2023

Hi there

Im creating a custom macro (eg Pet)  using Forge and Confluence Cloud,

For the code eg 

const App = () => {
  // Retrieve the configuration
  const config = useConfig() || defaultConfig;

  // Use the configuration values
  return <Text>{config.name} is {config.age} years old.</Text>;
};

 How do I return custom HTML code eg <div>{more html code}</div>.   If I place DIV statements in the return code, then the confluence editor displays an error message.

Thanks

Lee

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Dugald Morrow
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2023

Hi @Lee Parvin ,

The best place to ask this is in the Atlassian Developer Community with the Forge Custom UI and UI Kit category.

However, you should note that Forge UI Kit looks like React JS, but it isn't. This means that you need to use Forge UI Kit components and can not, for instance, insert <div> elements.

For more details, you can visit the Forge developer documentation.

Regards,

Dugald

TAGS
AUG Leaders

Atlassian Community Events