Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FifteenWindows/OS Functions (continued)

ClipboardGetHTMLComponents Function

Overview

The ClipboardGetHTMLComponents function parses a string of raw HTML from the clipboard and returns components.

Syntax/Parameters

Syntax

string[] = ClipboardGetHTMLComponents ( string data );

Parameters

data

A string containing an HTML prefix. The string can also contain the raw HTML from the clipboard.

Return Value

Returns a string array containing parsed components from the raw HTML control prefix or an empty string array on failure. Use the GetLastError function to retrieve error information.

Remarks

In raw mode, the ClipboardGetHTML function will return HTML with a control prefix while the ClipboardGetHTMLComponents function parses the control prefix and returns an array with named keys for various sections.

  The following is an example of the header:

Version:1.0

StartHTML:000000274

EndHTML:000030189

StartFragment:000029905

EndFragment:000030105

StartSelection:000029905

EndSelection:000030105

SourceURL:http://www.zzz.co.uk/finance/

<!doctype html>

<html>

     ...

 

Component key names are as follows:

  Key Name   Description
  Control    
    Version   Microsoft control prefix version. Normally ‘1.0’.
  Offsets:    
    StartHTML   Decimal starting position of HTML.
    EndHTML   Decimal ending position of HTML.
    StartFragment   Decimal starting position of fragment of HTML. This can be the selected text or HTML code to support the selection.
    EndFragment   Decimal ending position of fragment.
    StartSelection   Decimal starting position of selected portion of HTML.
    EndSelection   Decimal ending position of HTML.
  Additional Data:    
    SourceURL   Source URL. This can appear if the data is copied from a browser.

 

All offsets will be -1 if not supplied. The GetStringSegment function can be used to extract the specific areas of the HTML.

Related Functions 

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic