Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const url = require('url');
- const path = require('path');
- module.exports.Save = async(dialog) => {
- const mainWindowHTML = url.format({
- pathname: path.join(__dirname , "./htmls/MainWindow.html"),
- protocol: "file",
- slashes: true
- });
- const text = mainWindowHTML.getTextAreaText();
- console.log(text);
- }
- module.exports.New = async(dialog) => {
- }
- module.exports.Exit = async(window) => {
- window.close();
- }
- <html lang="en">
- <head>
- <title>document</title>
- </head>
- <body>
- <textarea id="code" cols="30" rows="10"></textarea>
- </body>
- <script>
- module.exports.getTextAreaText = async() => {
- return (document.getElementById("code").innerText)
- }
- </script>
- </html>
Add Comment
Please, Sign In to add comment