The current solution is ignoring the other types of pasted objects than text - URL and Intent. In this solution I've created 3 independent interfaces for plugins to override this behaviour for all types of pasted items.
Test 1 - paste without selected text
Run the app without changes
Copy an URL from outside of the app
Click into an empty line
Long press + paste
Notice the URL is pasted and is not clickable
Test 2 - paste over selected text
Run the app without changes
Copy an URL from outside of the app
Long press on a word
Paste
Notice the URL has replaced the selected text and is not clickable
Test 3 - paste URL with plugin enabled
In the MainActivity add .addPlugin(UrlPastePlugin()) to the Aztec object
Run the app
Copy an URL from outside of the app
Click on an empty line
Paste
Notice the URL is pasted but it's a link redirecting to the URL
Test 3 - paste URL over selected text with plugin enabled
In the MainActivity add .addPlugin(UrlPastePlugin()) to the Aztec object
Run the app
Copy an URL from outside of the app
Long press on a word
Paste
Notice the selected word is now a link and it's a link redirecting to the URL
Review
@khaykov
Make sure strings will be translated:
[x] If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.
Fix
The current solution is ignoring the other types of pasted objects than text - URL and Intent. In this solution I've created 3 independent interfaces for plugins to override this behaviour for all types of pasted items.
Test 1 - paste without selected text
Test 2 - paste over selected text
Test 3 - paste URL with plugin enabled
.addPlugin(UrlPastePlugin())
to the Aztec objectTest 3 - paste URL over selected text with plugin enabled
.addPlugin(UrlPastePlugin())
to the Aztec objectReview
@khaykov
Make sure strings will be translated:
strings.xml
as a part of the integration PR.