Skip to content

Conversation

@chittolinag
Copy link
Contributor

@chittolinag chittolinag commented Jan 22, 2026

Adds a wrapBetweenPermission command.

This command wraps the current selection with a matching w:permStart/w:permEnd pair. It auto-generates an id when one isn’t supplied and defaults toedGrp="everyone" so the range stays editable in viewing mode, but you can override the access scope:

// Everyone can edit
editor.commands.wrapBetweenPermission();

// Lock to a group
editor.commands.wrapBetweenPermission({ edGrp: 'contributors' });

// Lock to a specific user (domain\alias)
editor.commands.wrapBetweenPermission({ id: '900', ed: 'superdoc.dev\\author' });

The command always inserts both tags ensuring the permission overlay reflects every protected block while the transaction filter enforces who can actually edit inside it.

@linear
Copy link

linear bot commented Jan 22, 2026

@chittolinag chittolinag changed the title SD-1544 - Add command to set permission start end SD-1544 - Add command to set permission tags Jan 22, 2026
@chittolinag chittolinag marked this pull request as ready for review January 22, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants