We have these 2 functions in core that are good to use on install - but they are not officially supported as an endpoint. I feel like copying them into civix makes sense -
Alternatively we could start to build out the concept of describing options & option groups as metadata (like we do with settings)
public function install() {
CRM_Core_BAO_OptionValue::ensureOptionValueExists([
'option_group_id' => 'wysiwyg_editor',
'label' => 'CKEditor5',
'name' => 'CKEditor5',
]
);
return TRUE;
}