-
Notifications
You must be signed in to change notification settings - Fork 2
In depth documentation
- appendDescription(path, element, JSONData)
This function requires the path of the JSON to parse, element (wrapper) and JSONData (optional, saves resources by not parsing the JSON again if it has already been parsed). It checks if the depiction has already been appended (the alreadyRan html tag, this has to be reset if you want to render a different depiction) and if not, it loops through the views in the JSON (in JSONData.description) (they are objects, see the Sileo depiction documentation) and calls depictionAppendEngine()
- depictionAppendEngine(element, JSONData, index)
This function checks if the current class equals to some supported class, appends the element and returns true, if not, it returns false, that trows an error. Some classes support customisation (DepictionLabelView for example).
- renderMarkdown(markdown)
This function renders markdown passed to it with the markdownit() engine. It returns the rendered HTML string.