drop-site(key
, value
, ..., key
, value
)
Inserts a button in generated content which can be used to execute a command (see Chapter 6, Commands written in the Java™ programming language in XMLmind XML Editor - Commands). Identical to command-button except that:
A drop-site
cannot be used to popup a menu.
The user cannot click on a drop-site
. He/she needs to drop a string (typically a filename or an URL coming from a file manager or a Web browser) on it to trigger the command.
The parameter of the command must contain variable %{value}
which is substituted with the dropped string.
If the object dropped from an external application is not a string (that is, some text), this object will be automatically converted to a string (when possible). For example, a file is converted to a string by using its absolute filename.
In addition to %{value}
, the following convenience variables are also supported:
If %{value}
contains an URL or the absolute filename of a file or a directory, this variable contains the corresponding URL.
If %{value}
contains a "file:
" URL or the absolute filename of a file or a directory, this variable contains the corresponding filename.
Example:
br|date:after { display: block; content: drop-site(text, "Drop a screen shot here", icon, url(drop.gif), icon-position, right, command, "paste", parameter, "after <?xml version='1.0'?><screenShot \ xmlns='http://www.xmlmind.com/xmleditor/schema/bugreport' \ image='%{value}'/>"); }