Diff Result

Diff Result

convertDiffToHighlights()

Takes a diff array and returns a left and right highlighted result

Arguments

NameTypeRequiredDefaultOptionsDescription
aDiffarrayYes

getDiff()

Returns an array of diff structs

Arguments

NameTypeRequiredDefaultOptionsDescription
oldstringYesOriginal array of words to compare
newstringYesNew array of words to compare

getHTMLAsText()

Converts html to plain text indented according to nesting

Arguments

NameTypeRequiredDefaultOptionsDescription
htmlstringYes

getObjectDiff()

Performs diff on all visible properties according to their type

Arguments

NameTypeRequiredDefaultOptionsDescription
leftstructYes
rightstructYes
stMetadatastructNo#structnew()#
includeInvisiblePropertiesbooleanNofalseSet to true to include properties that aren't displayed in forms. Note that this will never include system properties, only content properties.

getPropertyDiff()

Performs diff on the property according to its type

Arguments

NameTypeRequiredDefaultOptionsDescription
typenamestringYes
leftstringYes
rightstringYes
stMetadatastringYes

init()

Arguments

stringToArray()

Returns the string as an array of characters

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
sstringYes

structCreate()

Creates and populates a struct with the provided arguments

Arguments

NameTypeRequiredDefaultOptionsDescription
None