Enabling the User-Saved Blocks feature in Unlayer allows users to save their customized blocks directly within the editor. This can significantly enhance the flexibility and usability of the Unlayer editor for your end-users. Follow the instructions below to implement this functionality.
Prerequisites
To enable User-Saved Blocks, it is essential to implement End-User Identification. This involves passing a user object in the unlayer.init() configuration. The user object ensures that saved blocks are specific to individual users and securely linked to their accounts.
Implementation Steps
Use the unlayer.init() method to configure the Unlayer editor in your application.
Include the user object in the configuration to allow for end-user-specific operations, as shown in the example below:
β
unlayer.init({
id: 'editor',
displayMode: 'email',
projectId: 0, //Enter your projectID here.
user:{
id:1
},
Additional References
For further information, refer to the following official resources:
By following these steps, the User-Saved Blocks feature can be successfully enabled in your Unlayer editor configuration.
