# tableberg/1.2.0/src/blocks/move-lock.ts

Tableberg – Simple Gutenberg Table Block, version 1.2.0. 26 lines.

- Page: https://pluginprobe.com/plugins/tableberg/1.2.0/code/src/blocks/move-lock.ts
- Raw: https://pluginprobe.com/plugins/tableberg/1.2.0/raw/src/blocks/move-lock.ts
- Modified: 2026-09-30T16:56:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/1.2.0/code/src/blocks/move-lock.ts#L10-L20`.

```typescript
import { isProAvailable } from "../pro-status";

/**
 * Moving rows and columns is a pro feature, so without pro the row and cell
 * blocks are locked against the editor's own movers and drag handle, which
 * is also what the editor's padlock in the toolbar then says. With pro the
 * lock is simply not there, so the core move handles work as they do on any
 * other block.
 *
 * The lock is applied at registration rather than in block.json, since
 * block.json can only carry one fixed default.
 */
export function withMoveLock(attributes: Record<string, unknown>) {
    if (isProAvailable()) {
        return attributes;
    }

    return {
        ...attributes,
        lock: {
            type: "object",
            default: { move: true },
        },
    };
}

```
