Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Editor#beforeToggleMarkup hook #571

Merged
merged 1 commit into from
Aug 14, 2017
Merged

Add Editor#beforeToggleMarkup hook #571

merged 1 commit into from
Aug 14, 2017

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Aug 14, 2017

The hook runs before editor#toggleMarkup will apply its changes. If any
hook returns false, the changes will not be applied.

This can be used to apply arbitrary user-defined rules to reject certain
types of formatting changes, or e.g. validate a URL before allowing a
writer to create a link to it.

The hook runs before editor#toggleMarkup will apply its changes. If any
hook returns `false`, the changes will not be applied.

This can be used to apply arbitrary user-defined rules to reject certain
types of formatting changes, or e.g. validate a URL before allowing a
writer to create a link to it.
@bantic bantic merged commit 6017e56 into master Aug 14, 2017
@bantic bantic deleted the editor-before-hooks branch August 14, 2017 16:12
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.

1 participant