Live Clipboard

Last updated
Live Clipboard
Live Clipboard logo Windows Live Clipboard logo.png
Live Clipboard logo
Developer(s) Microsoft
Preview release
0.93
Type Cut, copy and paste
License Freeware
Website code.msdn.microsoft.com/liveclipboard/

Live Clipboard is an extensible data format and set of UI technologies used to support copy/paste operations between web applications in browsers, and between web and desktop applications. Unlike the typical copy/paste experience in browsers, the Live Clipboard mechanism never needs to display a security dialog to the end user, thus delivering a more streamlined user experience.

In human–computer interaction and user interface design, cut, copy and paste are related commands that offer an interprocess communication technique for transferring data through a computer's user interface. The cut command removes the selected data from its original position, while the copy command creates a duplicate; in both cases the selected data is kept in a temporary storage device called the clipboard. The data in the clipboard is later inserted in the position where the paste command is issued. The data is available to any application supporting the feature, thus allowing easy data transfer between applications.

Contents

Live Clipboard is licensed under the Creative Commons Attribution-ShareAlike License (version 2.5). As of late 2009, the updated specification, Javascript files and sample code can be found here: [1] [2]

DHTML technical introduction

The Live Clipboard DHTML provides copy/paste functionality for data associated with a web page using the Live Clipboard XML data format. It consists of the following components:

It is designed to use standard Javascript and CSS techniques to “bring the clipboard to the web” and to work in as many browsers as possible. Currently, it is verified to work in IE 8 and in Mozilla Firefox 3.5.2. The control does not depend on installation of any client-side applications or browser plug-ins, and it never gains access to the contents of the clipboard without explicit user action.

How it works

The control positions a transparent (opacity = 0) input element in a containing div element with a background .png image of the clipboard icon. When the user gives focus to the input by left- or right-clicking it, tabbing etc. the control script gets the data that should be copied by calling the OnGetLiveClipboardData function. This callback function is implemented by the page developer and returns an instance of LiveClipboardClass containing the data that should be copied to the clipboard. Next, the control script serializes this data to the Live Clipboard XML format, which it sets as the value of the input element and selects.

At this point, if the user issues a "copy" command via the context menu, browser edit menu, ctrl-C command etc., the selected contents of the input are put on the clipboard. Alternately, if the user issues a "paste" command, the value of the input is replaced with the current data on the clipboard. In this case, the control script detects that the input value has changed, de-serializes the value from Live Clipboard XML format to an instance of LiveClipboardClass, and passes the object to the OnHandleLiveClipboardData function.

The paste callback function is implemented by the page developer and responds to the pasted data as desired. Specifically, it might iterate through the present data formats, apply data in any recognized format(s) to the page, make an asynchronous call to the web server to persist state, set up a new feed subscription, etc. It is also valid to do nothing, such as when none of the formats in the pasted data are valid for the associated data.

There are mechanisms to use keyboard events to trigger copy/paste. This is accomplished by calling the InitiateKeyboardCopyToLiveClipboard and InitiateKeyboardPasteFromLiveClipboard functions.

Related Research Articles

Document Object Model convention for representing and interacting with objects in HTML, XHTML and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

XForms is an XML format used for collecting inputs from web forms. XForms was designed to be the next generation of HTML / XHTML forms, but is generic enough that it can also be used in a standalone manner or with presentation languages other than XHTML to describe a user interface and a set of common data manipulation tasks.

Extensible Application Markup Language is a declarative XML-based language developed by Microsoft that is used for initializing structured values and objects. It is available under Microsoft's Open Specification Promise. The acronym originally stood for Extensible Avalon Markup Language, Avalon being the code-name for Windows Presentation Foundation (WPF).

A clipboard manager is a computer program that adds functionality to an operating system's clipboard. Many clipboards provide only one buffer for the "copy and paste" function, and it is overwritten by each new "copy" operation. The main task of a clipboard manager is to store data copied to the clipboard in a way that permits extended use of the data.

AutoHotkey free, open-source macro-creation and automation software for Windows

AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application. User interfaces can easily be extended or modified by AutoHotkey. The AutoHotkey installation includes its own extensive help file, and web-based documentation is also available.

JSON text-based open standard designed for human-readable data interchange

In computing, JavaScript Object Notation (JSON) is an open-standard file format that uses human-readable text to transmit data objects consisting of attribute–value pairs and array data types. It is a very common data format used for asynchronous browser–server communication, including as a replacement for XML in some AJAX-style systems.

Ajax is a set of web development techniques using many web technologies on the client side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page. In practice, modern implementations commonly utilize JSON instead of XML.

In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files.

The clipboard is a data buffer used for short-term data storage and/or data transfer between documents or applications used by cut, copy and paste operations and provided by the operating system. It is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces. A typical application accesses clipboard functionality by mapping user input such as keybindings, menu selections, etc. to these interfaces. The semantics of the clipboard facility varies from one operating system to another, and can also vary between versions of the same system. They can sometimes be changed by different programs or by user preference.

YUI Library

The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting. YUI includes several core CSS resources. It is available under a BSD License. Development on YUI began in 2005 and Yahoo! properties such as My Yahoo! and the Yahoo! front page began using YUI in the summer of that year. YUI was released for public use in February 2006. It was actively developed by a core team of Yahoo! engineers.

jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT License. Web analysis indicates that it is the most widely deployed JavaScript library by a large margin.

Advanced Content provides interactivity in the HD DVD optical disc format.

JSONP is a javascript pattern to request data by loading a <script> tag. It was proposed by Bob Ippolito in 2005. JSONP enables sharing of data bypassing same-origin policy. The policy disallows running JavaScript to read media DOM elements or XHR data fetched from outside the page's origin. The aggregation of the site's scheme, port number and host name identifies as its origin.

Extensible Hypertext Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used Hypertext Markup Language (HTML), the language in which Web pages are formulated.

Effi is C++ application development framework.

Maveryx is a cross-platform GUI Test Automation Framework developed by Maveryx Srl. This Framework provides functional UI, regression, data-driven, and keyword-driven testing capabilities to test a wide range of Desktop and Web technologies. Maveryx Test Automation Framework allows testing many different GUI technologies. Unlike other testing tools, Maveryx does not need recordings, code instrumentation, GUI Maps or Object Repositories to create and run automated tests.

MARIA is a universal, declarative, multiple abstraction level, XML-based user interface markup language for modelling interactive applications in ubiquitous environments.

Gyroscope is an open source PHP framework and a code template system for building web backend systems. Gyroscope uses a specific and yet flexible user interaction model to reveal and explore the inner-relations of a database.

References

  1. "Live Clipboard".
  2. Arrington, Michael (7 March 2006). "Microsoft Live Clipboard – "Wiring the Web"". TechCrunch.