Hello folks,
In any Sitecore CMS, the Experience Editor is an integral part. It makes editing content easy and allows users to see their changes directly.
As we transition to headless technology, the Experience Editor is now managed by a rendering engine. We have hosted our Next.js application there.
In next js application we can manage that if we can edit fields or not . There are fields like single line text , rich text and many more you can read here.
There is one variable you need to pass for getting them editable in experience editor . By default that variable is false if you need to update you need to pass true
import { Link } from '@sitecore-jss/sitecore-jss-nextjs';
<Link
editable={true}
</Link>
In above code snippet we have used LINK fields for general link . By passing editable={true} we have enabled editing in Experience Editor . If you want to prevent edits to this field, pass editable={false}. It will not be editable in Experience Editor, but the user can still view the link field.
This will help you to manage which field should be edited which not.
happy coding 😊







Leave a comment