Is there a Confluence macro to limit or show the number of characters in its body?

I have a use case that requires many identically structured pages with a fixed multi column/row layout. For the moment, I'm resorting to a custom page template, which works fine as such. However, one aspect of that predefined layout is that several text areas have a hard maximum character limit.

Is there a macro (or any other approach) to limit or at least show the number of allowed characters in a text area so that the page template users are guided regarding the character limit while editing the page?

1 answer

1 accepted

1 vote
Answer accepted

I would start by just using a panel macro which says the max number. But off the top of my head, I don't know of any macro which does what you want.

If you're on Server, then a user macro may be an easy solution? If cloud, then writing a connect add-on for this should also be fairly simple.

Thanks @Boris Berenberg - seems a no is the correct answer then.

The request is for Server right now, but would apply to Cloud scenarios too down the road. I've scheduled a backlog item for our team now, let's see whether we can up with something (looks like the typical 'hardly enough pain to tackle it' issue though ...).

Meanwhile, showing the allowed number of characters in 
a panel macro might indeed be a helpful workaround for scenarios where the layout/visual impact doesn't matter, good idea!

At the end of the day, no macro can modify whats going on in the editor. The closest I can say is you could have a macro that displayed the character count, and try and detect if it's being used in a preview view, and then have text entered into a property instead of macro body. If you don't detect preview view, you just show the text, and no count.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

212 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you