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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events