Coder Social home page Coder Social logo

textpad's People

Contributors

syndicatefx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

textpad's Issues

What about sending the text by mail?

I implement the following for me and it works nice ;-) by the way nice little tool you made!!

Add in the app.js file this:

document.addEventListener("DOMContentLoaded", function(event) {

  // Declare our variables

  var title   = document.getElementById("fileName"),
      content = document.getElementById("fileContent"),
      start   = document.getElementById("start"),
      home    = document.getElementById("homepage"),
      send    = document.getElementById("send"),
...

and later in the same file:

  // Send File(icon)

  send.addEventListener("click", function(event) {
    event.preventDefault();
    if(title.value == "") {
      smoke.prompt("Please give your email a subject!\n or just keep the default below.", function(e) {
        if(e) {
          title.value = e;
          localStorage.setItem("textPad-title", e);
          var link = "mailto:"
             + "?subject=" + escape(title.value)
             + "&body=" + escape(content.value);
          window.location.href = link;
        }
      }, {
        reverseButtons: true,
        value: "my-text-file",
        ok: "Send",
        cancel: "Cancel"
      });
    } else {
      var link = "mailto:"
          + "?subject=" + escape(title.value)
          + "&body=" + escape(content.value);
      window.location.href = link;
    };

  }, false);

and in the app.css file this:

.send-btn:hover svg {
  fill: #971ffd;
}

and in the index.html file add the following:

<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns:xlink="http://www.w3.org/1999/xlink"><defs>

<symbol id="icon-file-send" viewBox="0 0 24 24"><title>file-send</title><polygon points="3 12 8.61 14.992 17 8 9 17.455 9 21 12.164 16.887 18 20 21 3 3 12"/></symbol>

and later on:

<div class="btn-group">
		
		<button id="send" class="send-btn" title="Send Text by eMail"><svg><use xlink:href="#icon-file-send"></use></svg></button>

Please let me know what you think about that ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.