Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eContextMenuItems\u003c/code\u003e namespace provides functions to register custom options in Blockly's context menu.\u003c/p\u003e\n"],["\u003cp\u003eThese functions allow developers to add functionalities such as block manipulation, commenting, and navigation.\u003c/p\u003e\n"],["\u003cp\u003eOptions for block operations like collapsing, expanding, duplicating, deleting, and disabling can be easily integrated.\u003c/p\u003e\n"],["\u003cp\u003eWorkspace comment management features like adding, deleting, and duplicating comments are also included.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage these functions to enhance user interaction and workflow within the Blockly editor.\u003c/p\u003e\n"]]],["The ContextMenuItems namespace provides functions to register various options for block and workspace manipulation. These include actions to register options like cleaning up, collapsing, expanding, deleting, duplicating, enabling/disabling blocks. It also allows registration of comment functionalities like adding, removing, or duplicating comments. Moreover, it supports help access, variable inlining, and the ability to undo/redo actions. These functions are to register menu options.\n"],null,["[blockly](./blockly.md) \\\u003e [ContextMenuItems](./blockly.contextmenuitems_namespace.md)\n\nContextMenuItems namespace\n--------------------------\n\nFunctions\n---------\n\n| Function | Description |\n|-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| [registerCleanup()](./blockly.contextmenuitems_namespace.registercleanup_1_function.md) | Option to clean up blocks. |\n| [registerCollapse()](./blockly.contextmenuitems_namespace.registercollapse_1_function.md) | Option to collapse all blocks. |\n| [registerCollapseExpandBlock()](./blockly.contextmenuitems_namespace.registercollapseexpandblock_1_function.md) | Option to collapse or expand a block. |\n| [registerComment()](./blockly.contextmenuitems_namespace.registercomment_1_function.md) | Option to add or remove block-level comment. |\n| [registerCommentCreate()](./blockly.contextmenuitems_namespace.registercommentcreate_1_function.md) | Registers an option for adding a workspace comment to the workspace. |\n| [registerCommentDelete()](./blockly.contextmenuitems_namespace.registercommentdelete_1_function.md) | Registers an option for deleting a workspace comment. |\n| [registerCommentDuplicate()](./blockly.contextmenuitems_namespace.registercommentduplicate_1_function.md) | Registers an option for duplicating a workspace comment. |\n| [registerCommentOptions()](./blockly.contextmenuitems_namespace.registercommentoptions_1_function.md) | Registers all workspace comment related menu items. |\n| [registerDelete()](./blockly.contextmenuitems_namespace.registerdelete_1_function.md) | Option to delete a block. |\n| [registerDeleteAll()](./blockly.contextmenuitems_namespace.registerdeleteall_1_function.md) | Option to delete all blocks. |\n| [registerDisable()](./blockly.contextmenuitems_namespace.registerdisable_1_function.md) | Option to disable or enable a block. |\n| [registerDuplicate()](./blockly.contextmenuitems_namespace.registerduplicate_1_function.md) | Option to duplicate a block. |\n| [registerExpand()](./blockly.contextmenuitems_namespace.registerexpand_1_function.md) | Option to expand all blocks. |\n| [registerHelp()](./blockly.contextmenuitems_namespace.registerhelp_1_function.md) | Option to open help for a block. |\n| [registerInline()](./blockly.contextmenuitems_namespace.registerinline_1_function.md) | Option to inline variables. |\n| [registerRedo()](./blockly.contextmenuitems_namespace.registerredo_1_function.md) | Option to redo previous action. |\n| [registerUndo()](./blockly.contextmenuitems_namespace.registerundo_1_function.md) | Option to undo previous action. |"]]