Context Menu in Grid View
When you right-click a component in JSON Grid View, a context menu (screenshot below) appears that provides commands for modifying the display and editing the document. The context menu can also be accessed by pressing the Menu key. The commands of the context menu are described below.
Type
Hovering over the Type command causes a sub-menu to be displayed in which you can select the type of the component. You can also access the Type sub-menu via the shortcut Ctrl+Menu key.
Insert After/Before, Append, Add Child
The Insert and Append commands add an item at the same level. The new item is added in the case of Insert After and Insert Before, respectively, after and before the selected item, and in the case of Append as the last sibling of the selected item. The Add Child command appends a new item as a child. If one or more child items already exist, then the type of the new item will be the same as that of the last child. If no child exists, then the new item will be an empty key:value pair. For example, if the selected item is an array, with object children, then the new child item will be appended as the last child object.
Wrap in Array, Wrap in Object
The selected part of the table can be wrapped in either an array or an object.
Move Up/Down/Left/Right
If it is possible to move a component up, down, left or right from its current location in the grid, then the corresponding command/s are enabled. Select the respective command to carry out the move.
Copy
These commands can be used to copy the current selection to the clipboard. Only those options are enabled that are allowed on that component.
Command | Description |
Copy as JSON Text | Current selection is serialized as JSON markup |
Copy as Tab-separated Text | Current table selection is serialized as TSV (Tab-Separated Values) |
Copy as Image | Current image cell is copied as an image |
Note the following points:
•Copy as Image copies the Base64-encoded string of the selected image. If the string is pasted to a document where the Base64-encoded string can be rendered as an image (for example to another table cell in Table Display), then it will be rendered. Otherwise, it will be pasted as a string.
•To insert text in a cell, copy the text and paste it in the cell.
•To import an image from a file, use the command Edit | Insert | Encoded External File. This inserts an image as Base64-encoded string, and displays this string as an image in JSON Grid View. Image file formats that are supported for import are: PNG, JPEG, BMP, GIF, TIFF.
Copy XPath
This command copies to the clipboard an XPath 3.1 locator expression, starting at the document root, that locates the selected node.
Copy JSON Pointer
This command copies to the clipboard a JSON Pointer expression that locates the selected node. For example: /Artists/1/Albums/1/Tracks. See Copy XPointer/JSON-Pointer for more information.
Filter, Filter to Focus
The Filter command is a toggle command. It adds a filter to the selected object or deactivates a filter. Note that, after you add a filter via this command, you must enter a filter expression; otherwise the filter will automatically be removed. After a filter has been added you can deactivate it by selecting the command again or clicking the filter. To remove the filter, click Remove all filters in the toolbar.
The Filter to Focus command (i) builds a filter on the root element which contains an XPath expression to locate the selected node, and (ii) filters the Grid View display to show the selected node (and its descendants) directly under the root element. This is useful if you want to focus the display on just the selected node. To remove the filter, click the Filter icon in the content cell of the root element.
Expand Fully
This command is enabled if the selected component or any of its descendants is collapsed. It expands the component and all descendant components.
Collapse Unselected
This command collapses all components except the selected component and its ancestor components.
Text Direction
This command is available for nodes containing a String type, and switches the reading order to start from either the left or the right of the cell. This is useful when using languages such as Arabic and Hebrew.