Trigger the edit page experience from your SharePoint Framework solution

SharePoint Framework SPFx
post

This post is over a year old, some of this information may be out of date.

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:

Show image Trigger edit page
Trigger edit page

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

Show image 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
Building on Microsoft 365? Let's work together I help product teams with SharePoint Framework architecture, end-to-end testing and CI/CD. Get in touch →

Want the next article?

Subscribe to the RSS feed, or follow me where I share new posts.

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

I build developer tools · Microsoft 365 architect · Speaker

Loading...

Let's build together

All your AI coding agents in one window

Present from VS Code

Manage content in VS Code

See all my projects →