Skip to main content

Home > @jsplumbtoolkit/templates-2 > Recado

Recado class

Signature:

export declare abstract class Recado 

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the Recado class

Properties

PropertyModifiersTypeDescription
attributesReRegExp
cacheMap<string, any>
closeReRegExp
commentReRegExp
customTagsRecord<string, CustomTag>
defaultTemplatestring
entriesRecord<string, AbstractEntry>
helperExpressionReRegExp
isBrowserboolean
macrosRecord<string, (d: any) => string>
namespaceHandlersRecord<string, (tag: string) => ElementFacade>
namespacesRecord<string, string>
openCloseReRegExp
openReRegExp
templateCacheMap<string, Array<AbstractEntry>>
templateResolverTemplateResolver
tokenizerReRegExp

Methods

MethodModifiersDescription
_expand(expansionId, data)
_getDefaultTemplateResolver()
addTemplate(id, content)
cc(content)Create a comment element. Used as placeholders for loop/control structures.
ce(tag)Create an element for the current environment
cf()Create a Fragment for the current environment
clearCache()
ctn(value)Create a text node for the current environment
data(inObj, path, value)Get, or set, a value from/to an object.
each(l, fn, loopUuid, ctx, key)
getTemplate(id)
onUpdate(el, fn)
parse(str, templateResolver, extraProperties, parseIdStack)
parseAndCache(templateId, templateResolver, forceReload)Resolve, parse and then cache the template with the given id. If the template has already been resolved and parsed, return the parsed value, unless forceReload is set to true.
parseAttributes(el)
registerTag(tagName, handlers)
remove(el, removeFromDOM)Removes the given element from this Recado instance, and optionally removes it from the DOM too.
removeElement(e)
removeTextNode(e)
render(p, templateData, templateResolver)
resolveTemplate(id)
setAttribute(el, a, v)
template(id, data, templateResolver, forceReload)
update(el, templateData)