FBoardElementPermission
Command-backed Edit permission for one stable Board element.
Access
Access through:
Setup
Register @univerjs-pro/boards or a preset that includes it. In plugin mode, import @univerjs-pro/boards/facade. Additional methods below require their listed plugin packages. See Facade setup.
@univerjs-pro/boards
FBoardElementPermission.canEdit
Returns the effective Edit result after applying the Board unit and element permissions.
canEdit(): booleanReturns
Whether the element is currently editable.
Package: @univerjs-pro/boards · Type definitions
FBoardElementPermission.setEditable
Enables or disables editing for one stable Board element.
setEditable(editable?: boolean): Promise<void>Parameters
editable— Optional. Default:true. Whether element editing is allowed. Defaults to true.
Returns
Resolves after the permission command finishes.
Examples
const board = univerAPI.getActiveBoard()if (!board) throw new Error('No active Board.')const element = Object.values(board.getElements())[0]if (!element) throw new Error('Board element not found.')await board.getElementPermission(element.id).setEditable()Types: Promise
Package: @univerjs-pro/boards · Type definitions
FBoardElementPermission.setReadOnly
Makes this Board element read-only.
setReadOnly(): Promise<void>Returns
Resolves after the permission command finishes.
Types: Promise
Package: @univerjs-pro/boards · Type definitions
How is this guide?