Skip to content

Commit

Permalink
Improve plugin example: make it works for buttons also
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Jan 9, 2020
1 parent 69dcfd1 commit c7f5ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/js/plugins/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
return node;
}

if (node.type === 'text') {
Nova.app.$toasted.show('It worked!', { type: 'success' });
if (node.type === 'text' || node.type === 'button') {
Nova.app.$toasted.show('It works!', { type: 'success' });
return processAddedTextNode(node);
}

Expand Down

0 comments on commit c7f5ef5

Please sign in to comment.