Closed justindantzer closed 1 year ago
@justindantzer Thanks. This is now fixed with 1.2.3
Taking another look at it, you're right. Taking a look at the options for CKEditor, it should be replacing the 1st level of keys if they exist within the users config options. https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
There appears to be an issue with merging of config options and passed options on a specific field, resulting in duplicated toolbar items.
To Reproduce
CKEditor::make()
method to a given Nova resourceoptions()
method, apply toolbar modificationsExpected behavior The toolbar should be overridden by the options passed at the field level
Screenshots Actual
Expected
The issue appears to be related to the
array_merge_recursive
within theoptions()
method on the field:Calling
array_merge_recursive
on the entirety of the options array causes the duplication issue within the non-associativetoolbar
option. I don't thinkarray_merge_recursive
is necessarily wrong, but a special case is needed for thetoolbar
option and any other non-associative options.Generic recursive merge example: