How to know if I'm in the editor?


#1

IS there a quick way to know, in the mod JS, if the mod is loaded in the editor versus on a regular page?

In this case, I want to be able to have certain elements always show when I’m in the editor but only show conditionally on embedded mods using data-attributes.


#2

This would be possible but there isn’t currently a method. You could check the window.location.href as a workaround.

Can you elaborate on your use case?