By default, LiveWhale will sanitize and strip certain formatting from POSTed variables, and accepting WYSIWYG data might be stripped. If you’re using LiveWhale Forms or native Custom Fields, this is handled automatically for you.
However, you might have a custom module that includes its own custom fields, outside of the native config. In these cases, supporting WYSIWYG editing will require allowing it in the input filter.
In this example, WYSIWYG has been allowed in the events_edit and events_sub_edit page for the field ‘my_custom_wysiwyg_field’.
public function onInputFilter() { // on editor input filter
global $_LW;
if ($_LW->page=='events_edit' || $_LW->page=='events_sub_edit') { // if loading data for the events editor form
$_LW->ENV->input_filter[$_LW->page]['my_custom_wysiwyg_field']=['tags'=>'*', 'wysiwyg'=>1]; // allow wysiwyg entry on my_custom_wysiwyg_field
};
}
The environment variable $_LW->ENV->input_filter is where those settings are stored.