Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var player = GetPlayer();
- var editor = player.GetVar("editor");
- // Get the clipboard text
- navigator.clipboard.readText()
- .then((clipboardText) => {
- // Get the current content of the editor
- let currentContent = editor;
- // Append the clipboard text after the previous content
- let updatedContent = currentContent + clipboardText;
- // Update the editor variable with the combined content
- player.SetVar("editor",updatedContent);
- // You can now use editorVariable with the clipboard text appended to it
- })
- .catch((error) => {
- console.error('Failed to read clipboard text:', error);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement