Description

Inserts an RDFa resource into a dropzone. The new resource URI is read from the text/uri-list of the dropped data.

Signature

calli.insertResource( event )

Parameter Description
event HTML drop event

Example


<div id="related" dropzone="link string:text/uri-list" class="control-group"
        ondrop="return calli.insertResource(event)">
    <label class="control-label">Related</label>
    <div rel="skos:related" class="controls vbox">
        <span resource="?related" typeof="skos:Concept" class="ui-state-highlight ui-corner-all">
            <span property="skos:prefLabel" />
        </span>
    </div>
</div>

// Or, create your own pseudo event
calli.insertResource(jQuery.extend(jQuery.Event('drop'),
  {target:$('#id-of-dropzone')[0],dataTransfer:{getData:function(){return url_of_resource}}}
));