DEV: Update docs for composerBeforeSave (#18746)
* DEV: Update docs for composerBeforeSave
This commit is contained in:
parent
d0f88da9c9
commit
2737bc55bb
|
@ -1223,11 +1223,14 @@ class PluginApi {
|
|||
/**
|
||||
* Registers a "beforeSave" function on the composer. This allows you to
|
||||
* implement custom logic that will happen before the user makes a post.
|
||||
* The passed function is expected to return a promise.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* api.composerBeforeSave(() => {
|
||||
* console.log("Before saving, do something!");
|
||||
* return new Promise(() => {
|
||||
* console.log("Before saving, do something!")
|
||||
* })
|
||||
* })
|
||||
*/
|
||||
composerBeforeSave(method) {
|
||||
|
|
Loading…
Reference in New Issue