class CKEditor5::Rails::Presets::ToolbarBuilder
def item_matches?(existing_item, item)
- Example: Check if items match -
Returns:
-
(Boolean)
- true if items match, false otherwise
Parameters:
-
item
(Symbol
) -- Item or group name to match against -
existing_item
(Symbol, ToolbarGroupItem
) -- Item to check
def item_matches?(existing_item, item) if existing_item.is_a?(ToolbarGroupItem) existing_item.name == item else existing_item == item end end