Guest User

Untitled

a guest
Dec 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. const url = require('url');
  2. const path = require('path');
  3.  
  4. module.exports.Save = async(dialog) => {
  5.  
  6. const mainWindowHTML = url.format({
  7. pathname: path.join(__dirname , "./htmls/MainWindow.html"),
  8. protocol: "file",
  9. slashes: true
  10. });
  11.  
  12. const text = mainWindowHTML.getTextAreaText();
  13. console.log(text);
  14. }
  15.  
  16. module.exports.New = async(dialog) => {
  17.  
  18. }
  19.  
  20. module.exports.Exit = async(window) => {
  21. window.close();
  22. }
  23.  
  24. <html lang="en">
  25. <head>
  26. <title>document</title>
  27. </head>
  28. <body>
  29. <textarea id="code" cols="30" rows="10"></textarea>
  30. </body>
  31. <script>
  32. module.exports.getTextAreaText = async() => {
  33. return (document.getElementById("code").innerText)
  34. }
  35. </script>
  36. </html>
Add Comment
Please, Sign In to add comment