Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. chriscarex
    C
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    chriscarex

    @chriscarex

    0
    Reputation
    2
    Posts
    894
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    chriscarex Follow

    Posts made by chriscarex

    • RE: Copy to clipboard

      @misterjunio amazing thanks I will give it a try!

      posted in Developer Corner
      C
      chriscarex
    • Copy to clipboard

      Hi guys,
      I am trying to implement a copy to clipboard button which should take the value of a textarea .
      I tried both the clipboard.js library (https://clipboardjs.com/)

      var copiedtext = new Clipboard("#btn-copy");
      

      and the plain javascript approach

      $("#btn-copy").on('click', function(event) {
              var copyTextarea = $("textarea").select();
              document.execCommand('copy');
          });
      

      but none is working on mobile.
      Any suggestions or ideas?

      posted in Developer Corner
      C
      chriscarex