Skip to main content

Home > blockly > inject

inject() function

Inject a Blockly editor into the specified container element (usually a div).

Signature:

export declare function inject(container: Element | string, opt_options?: BlocklyOptions): WorkspaceSvg;

Parameters

ParameterTypeDescription
containerElement | stringContaining element, or its ID, or a CSS selector.
opt_optionsBlocklyOptions(Optional) Optional dictionary of options.

Returns:

WorkspaceSvg

Newly created main workspace.