The partial editing restriction function is a method of restricting all or part of a document from being editable.
Assignable target element
Model | Tag |
---|---|
Body | <div class='se-content'> |
Div | <div> |
Table | <table> |
TableCell | <td> |
How to specify
Using source code
Assign `se-lock` and `se-unlock` classes to the corresponding element in the source view.
Set lock, unlock
<div class="se-contents" style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; line-height: 1.2; padding: 25px;"> <table class="se-lock"> <tr> <td>1</td> <td class="se-unlock">2 - unlock</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table> </div>
Using API
Set lock, unlock
<script> window.editor.setLock('#lock-table'); window.editor.setUnlock('#unlock-cell'); </script> <div class="se-contents" style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; line-height: 1.2; padding: 25px;"> <table id="lock-table"> <tr> <td>1</td> <td id="unlock-cell">2 - unlock</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table> </div>
Rules of operation
- Selection works regardless of lock/unlock.
- If the lock is set, the child element cannot be edited.
- The unlock is only meaningful if the parent element is locked.
- Child Element can be edited if unlock is set.