Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

HTMLStyleRenderCode Function

Overview

The HTMLStyleRenderCode function renders the buffered text and style in the form of HTML code.

Syntax/Parameters

Syntax

string = HTMLStyleRenderCode ( handle hStyle, [int start], [int end]);

Parameters

hStyle

A handle to an HTML Style Object.

start

An optional int specifying the zero-based starting position. If omitted, the default value is -1 (same as zero, starting from the beginning).

end

An optional int specifying the zero-based ending position. If omitted, the default value is -1 indicating to return data to the end of the buffer.

Return Value

A string containing the HTML coded text or an empty string on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

The rendered code will contain the HTML tagging to represent the text and style within the buffer area specified. If an area is not specified, the entire buffer is rendered.

Positions can be determined using the HTMLStyleRenderText function. For example:

        a = HTMLStyleRenderText(hStyle);                 // Get the text representation for pos
        cx = InString(a, "	");                        // Delimiter (from hang)  
        a = ce_nbsp;                                     // Default arrangement    
        b = HTMLStyleRenderCode(hStyle, 0, cx);          // Get code up to the tab 
        c = HTMLStyleRenderCode(hStyle, cx + 4);         // Code after the tab end 
        c = TrimPaddingEntities(c);                      // Trim off all the space 

The variables a, b and c are strings to split hanging text into a table. a and b can be later interchanged depending on the alignment of the hanging portion. The position of the delimiting tab is located in the text portion and then used to split the HTML code. This will provide properly stacked code for each segment.

Related Functions

Platform Support

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

Legato IDE, Legato Basic