언어 설정

Menu
Sites
Language
How to copy to the clipboard in Tizen html 5 app?

i want to copy a string to the clipboard when user pushs a button.

 

How to copy to the clipboard in Tizen html 5 app?

Responses

3 댓글
Raghavendra Reddy Shiva

 

Here is how you can copy contents to clipboard,

saveToClipboard: function App_saveToClipboard(paths, mode)

{
   var clipboardLength = this.clipboard.add(paths);

   if (clipboardLength > 0)
   {
      this.clipboard.setMode(mode);
      app.ui.alertPopup('Data saved in clipboard');
      this.ui.clearTabbars();
   }
   else
   {
      alert('Error occured. Data has not been saved in clipboard');
   }

   this.ui.refreshPasteActionBtn(this.clipboard.isEmpty());
}

Refer here for more details on how to manage clipboards,

https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.appprogramming/html/tutorials/io_tutorial/task_filemanager.htm

Hope that helps.
 

 

Alex Belousov

Thank you for help! :)

Alexander AVSukhov

Hello,

For more info see http://dev.w3.org/2006/webapi/clipops/

Or you may use plugins, f.e. Zero Clipboard