{"id":56509,"date":"2022-07-30T03:01:41","date_gmt":"2022-07-29T17:01:41","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56509"},"modified":"2022-07-30T13:02:16","modified_gmt":"2022-07-30T03:02:16","slug":"clipboard-api-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/clipboard-api-primer-tutorial\/","title":{"rendered":"Clipboard API Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Clipboard API Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.jpg\" title=\"Clipboard API Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Clipboard API Primer Tutorial<\/p><\/div>\n<p>Here&#8217;s another day of testing a Javascript API today, which has that &#8220;desktop feel&#8221;, that being the <a target=_blank title='Clipboard API' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Clipboard_API'>Clipboard API<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Clipboard_API'><p>\nThe Clipboard API provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously read from and write to the system clipboard.\n<\/p><\/blockquote>\n<p> &#8230; our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.html_GETME\" title=\"clipboard_api_test.html\">clipboard_api_test.html<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.html\" title=\"Click picture\">proof of concept<\/a> version offering &#8220;text clipboard data&#8221; functionality from the text based clipboard into an HTML textarea element via &#8230;<\/p>\n<ul>\n<li>append<\/li>\n<li>prepend<\/li>\n<li>at cursor<\/li>\n<\/ul>\n<p> &#8230; modes of use, you can also try below (or get a <a onclick=\"if \n (1 == 11) { window.open('\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.htm','myifca');  \n } else { document.getElementById('myifca').src='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.htm'; }\" style=\"cursor:pointer;text-decoration:underline;\" title='Below'>sneak<\/a> <a title='New window' target=_blank href='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.htm'>peak<\/a> at tomorrow&#8217;s ideas) &#8230;<\/p>\n<p><iframe name=myifca id=myifca style=\"width:100%;height:1000px;\" src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clipboard_api_test.html\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56509' onclick='var dv=document.getElementById(\"d56509\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/paste\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56509' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s another day of testing a Javascript API today, which has that &#8220;desktop feel&#8221;, that being the Clipboard API &#8230; The Clipboard API provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/clipboard-api-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[214,4040,265,2127,576,652,907,997,1254,1262,1319],"class_list":["post-56509","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-clipboard","tag-clipboard-api","tag-copy","tag-cursor","tag-html","tag-javascript","tag-paste","tag-programming","tag-text","tag-textarea","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56509"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=56509"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56509\/revisions"}],"predecessor-version":[{"id":56530,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56509\/revisions\/56530"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}