Skip to content

feat: format editor content on paste #199

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

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Conversation

smeijer
Copy link
Member

@smeijer smeijer commented Jun 18, 2020

What:
Added on paste formatting on top of #197

Why:
Because if users paste their content, they might not realize that it will be formatted on blur. Formatting directly on paste, might prevent some manual formatting actions.

How:
Added an on change handler to CodeMirror, which ignores every change type except for the paste origin.

Checklist:

  • Tests
  • Ready to be merged

@smeijer smeijer added the feature New feature or request label Jun 18, 2020
@smeijer smeijer self-assigned this Jun 18, 2020
@smeijer smeijer merged commit 5023527 into develop Jun 18, 2020
@smeijer smeijer deleted the feature/format-on-paste branch June 18, 2020 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant