I found the solution. Example.
Trick is to edit multiline_field.php and add css (‘editor-buttons‘) and js (‘editor‘) dependencies – which otherwise are added only if the content editor is present.
JS editor dependency might not look needed at first, but without it, when you switch to HTML and back to visual, editor will crash.
class multiline_field extends mf_custom_fields {
public $allow_multiple = TRUE;
public $has_properties = TRUE;
function get_properties() {
return array(
'js' => TRUE,
'js_dependencies' => array
(
'editor'
),
'css' => FALSE,
'css_dependencies' => array
(
'editor-buttons'
)
);
}
(...)
WP version 3.3.2
Thanks CircaLucid, js error made me look in right direction.