Replies: 1 comment
-
You can define your own spacings: You could add your custom "default" class to the "none" spacing. The naming does not make much sense in this case, but it should get you the default spacing class for all boxes that currently have "none" set. Another option is to add a custom event listener for when a box is saved and force your spacing there: // Provider.php
use OFFLINE\Boxes\Models\Box;
public function boot()
{
// Untested code!
Box::extend(function (Box $box) {
$box->bindEvent('model.beforeSave', function () use ($box) {
if (!$box->data[Box::SPACING_KEY_BEFORE]) {
$box->data[Box::SPACING_KEY_BEFORE] = 'your-default-spacing';
}
});
});
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
By reading the doc, It seems it's not possible actually to define default values for spacing.
This is a feature I would need, add default "medium" spacing to my boxes
Thank you
Beta Was this translation helpful? Give feedback.
All reactions