A Blockly plugin that adds a toolbox category that allows searching for blocks.
npm install @blockly/toolbox-searchA Blockly plugin that adds a toolbox category for searching
blocks. The category displays a search field in the toolbox, and filters the available blocks as you
type. The Blockly docs have more information about toolbox definitions and categories.
```
yarn add @blockly/toolbox-search
``
npm install @blockly/toolbox-search --save
`
import * as Blockly from 'blockly';
import '@blockly/toolbox-search';
const toolboxCategories = {
'contents': [
/ Other toolbox categories with blocks go here /
{
'kind': 'search',
'name': 'Search',
'contents': [],
}
]
};
// Inject Blockly.
const workspace = Blockly.inject('blocklyDiv', {
toolbox: toolboxCategories,
});
``
Apache 2.0