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

RichText: clean up: remove paste timeouts #11978

Merged
merged 1 commit into from Nov 16, 2018

Conversation

Projects
None yet
2 participants
@iseulde
Member

iseulde commented Nov 16, 2018

Description

This PR removes some unnecessary code. We are no longer using the TinyMCE paste plugin, so there is no need to wait for ranges to be set back or paste bins to be removed. We can also check whether a range is collapsed or not though the rich text value, instead of checking this.editor.selection.isCollapsed().

How has this been tested?

  1. Paste a URL over a word. The word should be linked.
  2. Copy an image from one browser (e.g. Safari) with right-click+"copy image" and paste it in Gutenberg in another browser (e.g. Chrome) to paste the image as data. There are other ways to do this, just paste an image cross application. Paste it once in an empty paragraph and once in the middle of text. Either way the image should be pasted correctly.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@iseulde iseulde added this to the 4.5 milestone Nov 16, 2018

@iseulde iseulde requested a review from WordPress/gutenberg-core Nov 16, 2018

@jorgefilipecosta

Tests well for me, nice improvement 👍

@iseulde

This comment has been minimized.

Member

iseulde commented Nov 16, 2018

@iseulde iseulde merged commit 1dfee17 into master Nov 16, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@iseulde iseulde deleted the remove/paste-timeout branch Nov 16, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment