Download the PHP package riley19280/miro-clipboard without Composer
On this page you can find all versions of the php package riley19280/miro-clipboard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download riley19280/miro-clipboard
More information about riley19280/miro-clipboard
Files in riley19280/miro-clipboard
Package miro-clipboard
Short Description Interact with the miro clipboard
License MIT
Informations about the package miro-clipboard
Introduction
miro-clipboard allows you to generate and parse Miro clipboard data,
allowing custom functionality to be built into existing applications with a simple Copy and Paste.
This package also serves to document the various properties and identifiers that are utilized in the clipboard data.
Creating Clipboard Data
Clipboard data is created using the MiroClipboardData class, and consists of multiple objects that can be added to it.
The following object types are available:
Finally, the toHtml method is used to retrieve the Miro data string that can be pasted.
See Pasting clipboard data on how to properly paste into Miro.
Various methods are available on the Widget Objects to configure their position, size, style, and many other attributes. See below for a more complete example of what properties are available.
MiroShape Example
MiroLine Example
Pasting clipboard data
In order to paste the data into Miro, the resulting string needs to be copied as the text/html content type,
which may or may not get applied depending on your computer. To combat this, a file called clipboardLoader.html
is included in this repository. It provides a way to load the copied string into the clipboard as the correct content type
so that it can be pasted into Miro.
If you are using this package to integrate into an existing application, then you will want to do something similar to load the data directly.
Parsing Clipboard Data
Existing clipboard data can also be parsed into objects. This is done using the MiroParser class.
This results in a MiroClipboardData object.