Fetch aem url with editor.html in JS | Community
Skip to main content
Kishore_Kumar_
Level 9
Sep 12, 2019 2:58 PM UTC

Fetch aem url with editor.html in JS

how to fetch a aem complete url with editor.html or cf# in javascript. When i used javascript/jquery methods to fetch a url, editor.html or cf# is not coming.

For eg: In localhost:4502/editor.html/content/sample if i use window.location.href or any other js methods

it is returning only location:4502/content/sample.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

arunpatidar
New Participant
Sep 12, 2019 3:27 PM UTC

for touch UI, you can use below:

"/"+Granite.author.EditorFrame.editorVanityURL+Granite.author.page.path+".html"

/editor.html/content/AEM63App/fr.html

Translate
Arun Patidar
Kishore_Kumar_
Level 9
Sep 12, 2019 3:34 PM UTC

it is coming in console but if i use it in js file it is showing as undefined.

Translate
arunpatidar
New Participant
Sep 13, 2019 9:30 AM UTC

Where are you writing code. Inside sites js or dialog js?

If you need editor page when editing then create js with cq.authoring.dialog category.

Translate
Arun Patidar