Skip to content

Instantly share code, notes, and snippets.

@phantomtnt
Last active April 25, 2024 17:53
Show Gist options
  • Save phantomtnt/ba5831ec498b7b408bd6ac612d96525f to your computer and use it in GitHub Desktop.
Save phantomtnt/ba5831ec498b7b408bd6ac612d96525f to your computer and use it in GitHub Desktop.
Check if a Sharepoint classic page Is in edit mode #SharePoint #Helpers
var inEditMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;
if (inEditMode == "1")
{
// page is in edit mode
}
else
{
// page is in browse mode
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment