/ LJCPHPCodeDoc / LJCTextBuilderLib / LJCTextBuilder / GetAttribs


Parameters
htmlAttribs - The attributes collection.
textState - The current text state values.

Returns

The attributes text.

Syntax

JavaScript
GetAttribs(attribs, textState)

Gets the attributes text.

Remarks

The returned text does not end with a new line. This allows for additions after the text.
Begin, Create and End text will start with a new line if the builder text already has a value.

Example

JavaScript
// Gets the attributes text.
GetAttribs()
{
  // Root Method Begin
  const textState = new LJCTextState();

  const tb = new LJCTextBuilder(textState);
  const attribs = new LJCAttributes();
  attribs.Add("Attribute1", "One");
  attribs.Add("Attribute2", "Two");

  // Example Method:
  const result = tb.GetAttribs(attribs, textState);

  // result:
  // ' Attribute1="One" Attribute2="Two"'
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.