Skip to content

VirtualContent. Browser tool designed for handling large text/html content.

License

Notifications You must be signed in to change notification settings

vkrepkiy/virtualcontent

Repository files navigation

VirtualContent

VirtualContent - is a browser tool designed for handling large text/html content.

Installation

npm i --save virtualcontent

Usage

import "VC" from "virtualcontent";

VC.create(options).setText(str).renderTo($container);

Options

ParameterAcceptsDefault valueDescription
appendBoolfalseSwitch to Append mode (Replace mode is the default)
chunkPreProcessorFunctionnullSet function which receives chunk (String) as a first argument, and returns String.
delayInteger100Delay scroll processing.
lengthNumber10240Set maximum length for a chunk string
scrollableParentNode/jQueryEl/selectorundefinedSet scrollable parent node.
thresholdNumber2It defines how much chunks are shown at once in Replace mode (default)

API

MethodArgumentsReturnsDescription
create (static)optionsNew instanceCreate new VC instance
destroynoneselfDestroy VC instance
renderToNode/jQueryElselfRender to node or $el
setHtmlStringselfSet HTML content
setTextStringselfSet text content

About

VirtualContent. Browser tool designed for handling large text/html content.

Resources

License

Stars

Watchers

Forks

Packages

No packages published