You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The boilerplate uses a defaults object, but what does the code look like to update a setting of the plugin globally?
For example, if my plugin has a default setting message: 'Hello, world!' how can I update that default setting, so that anytime the plugin is called it would already be changed to message: 'New message.'
I have tried something like this
myPlugin.defaults = {
message: 'New message.'
};
The text was updated successfully, but these errors were encountered:
// Assuming your plugin is defined like this in your boilerplate
var myPlugin = {
defaults: {
message: 'Hello, world!'
},
// Other plugin methods and functionality
};
// Update the default setting globally
myPlugin.defaults.message = 'New message.';
// Now, anytime the plugin is used, it will use the updated default setting
The boilerplate uses a defaults object, but what does the code look like to update a setting of the plugin globally?
For example, if my plugin has a default setting
message: 'Hello, world!'
how can I update that default setting, so that anytime the plugin is called it would already be changed tomessage: 'New message.'
I have tried something like this
The text was updated successfully, but these errors were encountered: