Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Add proper paste support #1276

Merged
merged 1 commit into from
Feb 18, 2016
Merged

Add proper paste support #1276

merged 1 commit into from
Feb 18, 2016

Conversation

erikdubbelboer
Copy link
Contributor

Add paste="expression" to allow custom paste handling.

Allow pasting in tagging mode when the tagging function is not defined.

In IE use window.clipboardData so jQuery is not required.

Fixes #910, #704, #789, #848, #429

@logannc
Copy link

logannc commented Nov 4, 2015

Is there a reason that ctrl.searchInput.value is not used instead of the paste buffer? If not, you might miss things that are half-typed, half-pasted.

edit: ... nevermind about ctrl.searchInput.value. But the point about only using the clipboard stands.

Add paste="expression" to allow custom paste handling.

Allow pasting in tagging mode when the tagging function is not defined.

In IE use window.clipboardData so jQuery is not required.

Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429
@erikdubbelboer
Copy link
Contributor Author

@logannc you are correct, I changed it so that the current input is prepended to the pasted data before parsing.

@danielgrippi
Copy link

bump. can we get this merged?

@aaronroberson
Copy link
Contributor

Published in v0.14.7 if you would like to confirm.

@Hypercubed
Copy link

This is a useful feature and should be be documented. I suggest the following added to the wiki:

option description value default
paste Accepts a string which is a scope function. The function will be passed the pasted text as a string. string ($scope function) undefined

Updated.

@Hypercubed
Copy link

Actually, looking again it appears the return value is ignored. I updated the suggested addition.

@user378230
Copy link
Contributor

@Hypercubed you should be able to update the wiki yourself, your contribution would be welcome! 😃

@Hypercubed
Copy link

Sure, was going to do that first... but wanted to make sure I understood the API. My first assumption was not correct.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants