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

Include paste as default Editable TinyMCE plugin #1264

Merged
merged 1 commit into from Jun 20, 2017
Merged

Conversation

@aduth
Copy link
Member

aduth commented Jun 19, 2017

Closes #1041

This pull request seeks to specify the paste plugin as a default plugin for the Editable control. The paste plugin performs a number of clean-up tasks for pasting content, but notably includes the usability feature of pasting a URL to be applied as a link to the selected text.

Implementation notes / Open questions:

Previously we'd encouraged TinyMCE plugins to be specified by individual blocks to reflect the fact that Editable should be left as minimal as possible, with blocks individually adding functionality in an isolated way. In this case, paste is argued to be a "global" behavior for any Editable and is enabled for all Editable elements.

The paste plugin is appended regardless of whether the block implements its own getSettings prop for the Editable component, meaning that it is not possible for a block to disable the paste plugin. This was chosen instead of the alternative where a block implementer would be required to merge their additional plugins with the default set of plugins. I'm open to considering this alternative though, since it would only affect blocks which include their own additional plugins.

Testing instructions:

Repeat steps described at #1041, observing that pasting a URL applies a link to the selected text.

@ellatrix

This comment has been minimized.

Copy link
Member

ellatrix commented Jun 19, 2017

I've been working on this in #495.

@ellatrix

This comment has been minimized.

Copy link
Member

ellatrix commented Jun 20, 2017

While #495 started with just adding this plugin as well, I've since built on top of that. Let's merge this and then rebase the other PR.

Copy link
Member

ellatrix left a comment

I'm all for adding the paste plugin to all editables.

@aduth aduth merged commit 30008d3 into master Jun 20, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@aduth aduth deleted the update/1041-paste-link branch Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.