Open princebagthariya opened 1 month ago
Am I understanding you correctly in that you want to be able to press a button and go into edit mode on the page?
Firstly make sure you check out the page to the user via the rest API
If you're using PnPjs that looks something like this
sp.web.getFileByServerRelativePath("/sites/dev/SitePages/Home.aspx").checkout();
Then you can enable edit mode on the page by appending the query paramater Mode=Edit
const EditPage = () => {
let searchParams = new URLSearchParams(window.location.search);
searchParams.set("Mode","Edit")
window.location.search = searchParams.toString();
}
EditPage();
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Hello Everyone,
I have created an SPFx project with React.
I want to display the SPFx site page in edit mode by clicking the custom button, not SharePoint default edit button
Can anyone help me with the same?