Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let templateText = editor.getText().replace(/(\r\n|\n|\r)/gm, "\\n");
- if (templateText) {
- app.setClipboard(templateText);
- ui.hudSuccess("Copied template text to clipboard");
- } else {
- ui.hudError("Nothing to copy");
- }
- editor.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement