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

Parameter Type Description
container Element | string Containing element, or its ID, or a CSS selector.
opt_options BlocklyOptions (Optional) Optional dictionary of options.

Returns:

WorkspaceSvg

Newly created main workspace.