+ 3
The cut button..
How i can cut only the last letter of the text that you have written. Type any text in your keyboard, you can also cut the LAST & SINGLE letter by the cut button. How to make it. I can make function that cuts all the letters, it's lot easier, but how to do that ↑↑. Here is my code↓↓ https://code.sololearn.com/WkuUg3mobwCA/?ref=app Please suggest a way🙏
2 ответов
+ 2
These might give you an idea around clipboard data
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
(Edit)
This snippet makes use of the execCommand() because clipboard is unavailable in SoloLearn app
https://code.sololearn.com/WWgPAVRny2J6/?ref=app