Trigger the edit page experience from your SharePoint Framework solution

January 26, 2018

This is a quick article to show you how you can open the edit page experience from your SharePoint Framework solution. Such a trigger could be useful so that you can trigger the page its edit mode from within your web part, footer, …

Nothing more to say about it, so here is the code:

Here is an example of what you could expect:

Trigger edit page

Trigger edit page

When the page is checked out to someone else, you SharePoint lets you know who is editing it:

Page is already checked out

Page is already checked out

Other actions

Other actions like saving, publishing and discarding are also availble:

  • _api/sitepages/pages({id})/SavePageAsDraft
  • _api/sitepages/pages({id})/DiscardPage
  • _api/sitepages/pages({id})/SavePage

Comments