6

Is there any command with Anguilla Javascript Framework that allows us to know if we are working in XPM or CME in order to execute different commands?

0

1 Answer 1

5

I have found the solution:

$display.getWindow().$config.CurrentEditor

It returns: "CME" or "SiteEdit".

Hope it helps!

2
  • Nice find! I'm sure I've seen people ask this in the past. By the way, I believe that can be simplified to $config.CurrentEditor Jun 21, 2017 at 8:10
  • That it's true! Jun 26, 2017 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.