I'm new here

Get editorId via script

I didn't find the answer to this question but my german is not really good, so maybe I missed it.

My FirstSpirit projects publish a JSON output, so in ContentCreator I load the same JSON information via AJAX call + a Javascript framework to render it (using SAPUI5).

This is something I'm tied to due to architectural reasons.

This JSON files (one per project) are generated using Access API in one single page, so no section template code is executed; only their form content is retrieved via Access API.

So, in order to offer live editing in ContentCreator I need to get the editorId() information, the same that would be returned for an HTML output, but via Access API or any other way and add it to my JSON structure to read it in my SAPUI5 application.

What I've been searching for (without luck) is the way of:

  • Getting the editorId() HTML attributes via SiteArchitect script using Access API.
  • Get the output of a presentation channel via script and execute there the editorId() call.
  • Understand the structure of these editorId() HTML attributes so I can generate them from scratch using section Ids or any other info.
  • Implement my own FS BUTTON to open the same dialog or HTML Button to open this dialog via Javascript.

I'd like to know which do you think is the right way to go and if you could give me a starting point.

Thanks and best regards,


0 Kudos
3 Replies
I'm new here

Hi Andres,

I am not sure about the "one JSON per project" approach, but I assume that's a requirement. FirstSpirit offers many ways to create JSON instead of HTML, which may help for a better solution.

But to your problem:

Programmatically, you can use the RenderingAgent to render content of FirstSpirit elements. If the template contains an editorId() call, this should get you to a solution. Depending on where you start the script, you will have access to a context or a broker providing this agent on request.

Here you will find the API of the agent and an example on how to use it:

RenderingAgent (FirstSpirit Developer-API)

Hope this helps. More questions welcome.

Best regards


0 Kudos

Hi Stefan,

I think RenderingAgent is not available in my version.

I'm not finding anything when searching for it in my server help page.

Sorry I forgot to mention that I'm running FS 5.2.905.76007.

Could you point me to those ways of working with JSON?

Thank you!

PS: I guess update to a newer FS version is the right way to go for this issue but unfortunately not in my hands Smiley Sad

0 Kudos

Hi Andres,

Version 905? Ugh. Over 3 years old stuff.

Sorry, but that's to old to remember features. And, of course, it's not supported by our technical staff.

What is always possible is to have a dedicated channel that produces JSON instead of HTML. The output, of course, would have the same file structure as the HTML-Version. Maybe you could run some script afterwards to collect the results and generate your project-JSON.

Best regards


0 Kudos