Partial Edit Restriction
The partial edit restriction feature is a method of restricting the entire or part of the document so that editing is not possible.
Targetable Elements
| Model | Tag |
|---|---|
Body | <div class='se-content'> |
Div | <div> |
Table | <table> |
TableCell | <td> |
Specification Method
Specify in Source Code
In source view, specify the se-lock or se-unlock class on the corresponding Element.
<!-- lock, unlock specification -->
<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 the API
<!-- lock, unlock specification -->
<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>
Behavior Rules
- Selection works regardless of lock/unlock state.
- When lock is set, child Elements cannot be edited.
- unlock is only meaningful when lock is set on the parent Element.
- When unlock is set, child Elements can be edited.
Try It Out
Try Partial Edit Restriction