Added a global editor switch for all editors in JCB, the default is none. gh-305 Added two new fields to the admin view to target the getform method in the model.
This commit is contained in:
@ -184,6 +184,16 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
// update all editors to use this components global editor
|
||||
$global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
|
||||
$editors = $form->getXml()->xpath("//field[@type='editor']");
|
||||
foreach ($editors as $editor)
|
||||
{
|
||||
$name = (string) $editor['name'];
|
||||
$form->setFieldAttribute($name, 'editor', $global_editor);
|
||||
}
|
||||
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user