I'm writing a ScriptRunner snippet to pull content from a page so that I can parse it, and so far I've been able to pull content but it ignores the content in the code block macro, is there something I'm missing, or will this method not work with content in macro blocks?
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.pages.PageManager
import com.atlassian.confluence.pages.Page
def pageManager = ComponentLocator.getComponent(PageManager)
def page = pageManager.getPage(myPageID)
return page.bodyAsString
Is there a mistake in that, or another way to pull the content in the page other than page.bodyAsString?
I don't see a mistake with this.
Here is what I see when i do the same:
So in my case I need to be able to return the information in the code block, and when I try it just skips over. Using your example I need it to return:
A page with
content inside code block
Content after
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.