@instant-ar/blockly-plugin-workspace-search-modified

5.0.24 • Public • Published

@blockly/plugin-workspace-search Built on Blockly

A Blockly plugin that adds workspace search support.

Installation

npm install @blockly/plugin-workspace-search --save

Usage

ES6 Imports

import * as Blockly from 'blockly';
import { WorkspaceSearch } from '@blockly/plugin-workspace-search';

const workspace = Blockly.inject('blocklyDiv');
const workspaceSearch = new WorkspaceSearch(workspace);

workspaceSearch.init();

Script Tag

<script src="./node_modules/@blockly/plugin-workspace-search/dist/index.js"></script>

To open workspace search use either command + f or control + f. To close the search bar hit escape or the 'x' in the top right corner.

API

  • init: Initializes the workspace search bar.
  • dispose: Disposes of workspace search.
  • open: Opens the search bar.
  • close: Closes the search bar.
  • previous: Selects the previous block.
  • next: Selects the next block.
  • setSearchPlaceholder: Sets the placeholder text for the search bar text input.
  • addActionBtn: Add a button to the action div. This must be called after the init function has been called.
  • clearBlocks: Clears the selection group and current block.
  • searchAndHighlight: Searches the workspace for the current search term and highlights matching blocks.

License

Apache 2.0

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @instant-ar/blockly-plugin-workspace-search-modified

    Weekly Downloads

    8

    Version

    5.0.24

    License

    Apache-2.0

    Unpacked Size

    89.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • subham92
    • instantar