Skip to content

Commit

Permalink
Add contextMenuPlugin.submenuTitle to docs and test.
Browse files Browse the repository at this point in the history
I noticed that the arrow only renders properly in some cases.  For this reason, the submenuTitle only works sometimes.
  • Loading branch information
dhughes-xumak committed Jul 18, 2017
1 parent a8e3ae9 commit fbd082d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ Constructs a new JSONEditor.

The callback function when the custom action is clicked. Called with the selected node.

- `{string} submenuTitle`

The submenu expander's title (tooltip) text, for example `A longer description of the submenu`.

- `{Object[]} submenu`

Submenu items of the same type as `contextMenuPlugins`.
Expand Down Expand Up @@ -249,6 +253,10 @@ Constructs a new JSONEditor.

The callback function when the custom action is clicked. Called with the selected nodes.

- `{string} submenuTitle`

The submenu expander's title (tooltip) text, for example `A longer description of the submenu`.

- `{Object[]} submenu`

Submenu items of the same type as `multiContextMenuPlugins`.
Expand Down
2 changes: 2 additions & 0 deletions test/test_plugins.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
text: 'Submenu',
title: 'Action with submenu',
className: 'jsoneditor-action2',
submenuTitle: 'A title for the submenu expand button',
submenu: [
{
text: 'Submenu 1',
Expand Down Expand Up @@ -122,6 +123,7 @@
alert('Action 3');
alert(node);
},
submenuTitle: 'Another title for a different submenu expand button',
submenu: [
{
text: 'Submenu 1',
Expand Down

0 comments on commit fbd082d

Please sign in to comment.