Can I open a specific content item directly in Content Editor from a URL?
Question
Can I open a specific content item directly in Content Editor from a URL?
Answer
Yes. jContent encodes the editor state in the URL hash, and that is how its own "open in a new tab" action works.
The shape is:
<urlbase>/jcontent/<siteKey>/<language>/<mode><parentPath>#<hash>
where <hash> is a rison-encoded object:
{contentEditor: [{uuid: '<node uuid>', uilang: 'en', lang: 'en', mode: 'edit', isFullscreen: true}]}
Building it
import rison from 'rison-node';
const hash = rison.encode_uri({
contentEditor: [{
uuid, // the node's uuid, not its path
uilang: 'en',
lang: 'en',
mode: 'edit', // or 'create'
isFullscreen: true
}]
});
const url = `/jcontent/${site}/${lang}/${accordionMode}${parentPath}`;
window.open(`${window.contextJsParameters.urlbase}${url}#${hash}`, '_blank');
This is exactly what jContent's picker does when you ask it to open an item in a tab.
The four things that will trip you up
It is rison, not JSON. The hash is decoded with rison.decode_uri(...). A
JSON-encoded hash will not parse, and the failure is a thrown "Unable to decode
URI hash", not a graceful fallback. Rison is more URL-friendly than JSON, which
is why it is used.
It takes the uuid, not the path. You need the node's identifier; fetch it with a GraphQL query by path if all you have is a path.
The path in the URL is the parent, not the node you are editing. The URL part positions jContent's browser - which folder it opens - while the hash says what to edit inside it.
<mode> in the URL is an accordion key, not an edit mode. It is the left-nav
section - pages, content-folders, media - and it is unrelated to the mode
inside the hash, which is edit or create. Two different things with the same
name in one URL.
Note contentEditor is an array, which is how stacked editors are
represented.
Inside the app, do not build a URL
If your code is already running inside jContent, there is an API for this -
window.CE_API.edit(...) and window.CE_API.create(...) - which opens the editor
without a navigation. Build a URL only when the link has to work from outside,
such as in an email or another application.
A caveat worth stating
This is an internal URL contract, not a documented public API. It is how the product works today and it is stable enough for shipped code to rely on, but it can change between jContent versions. If you depend on it, pin the behaviour with a test rather than assuming it survives an upgrade.
This article was drafted with AI assistance, then reviewed and curated by Jahia Customer Support engineers before publication.