Skip to content

Commit

Permalink
feat(propsAPI): Pass the executeCommand method
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoli committed Sep 28, 2018
1 parent e9b7db4 commit dff1c1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Adapter/propsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ class PropsAPI {
constructor(editor) {
this.editor = editor;

['executeCommand'].forEach((key) => {
this[key] = (...params) => this.editor[key](...params);
});

['read', 'save', 'add', 'find', 'update', 'remove', 'getSelected'].forEach((key) => {
this[key] = (...params) => this.currentPage[key](...params);
});
Expand Down

0 comments on commit dff1c1b

Please sign in to comment.