How to set Cases Default Editor to HTML

When viewing Cases in Case Detail, when I go to edit the case no matter which way I do it:

* Click on edit icon 
    or
* Click on Case Subject then Actions / Edit

The Case Description, Resolution and Update text areas are displayed in text mode (green background). All HTML tags are shown in text mode. Some Cases do open up in the WYSWIG editor and I am not finding a reason why a hand full open up in this mode.

As for the rest, after opening the Case for editing, if I click on Previous or Next buttons on the top right hand corner, the Description and Updates text areas switch to a WYSWIG text editor while the Resolution text area stays in text mode with the green background.

I would like to have all of the editors default to a WYSWIG editor at all times. I have found some messages that state to set the $dictionary[‘Case’][‘fields’][‘resolution’][‘editor’] variable in a file in custom/Extension/modules/Cases/Ext/Vardefs folder to = ‘html’; but this does not appear to resolve the issue. I even tried $dictionary[‘Case’][‘fields’][‘description’][‘editor’] = ‘html’; without success.

I am sure I am doing something wrong but haven’t put my finger on it yet. Any ideas?

Tony

@tkoehn

You can set type for field as:

$dictionary[‘Case’][‘fields’][‘description’][‘type’] = ‘wysiwyg’

When I run Repair and Rebuild this wants to alter the database:

ALTER TABLE cases   modify COLUMN `description` wysiwyg  NULL ,  modify COLUMN `resolution` wysiwyg  NULL ;

Should this happen?

@tkoehn

Sorry, yes. But you can edit ‘custom/modules/<module_name>/metadata/editviewdefs.php’. It works. I tested.

                    0 => array (
                        'name' => 'description',
                        'type' => 'wysiwyg',
                        'label' => 'LBL_DESCRIPTION',
                        'displayParams' => array(
                            'rows' => 4,
                        ),
                    ),

Yes that worked much better. Thank you very much.

@p.konetskiy

I have custom module and used your suggested code in detailviewdefs.php, but I am not getting wysiwyg editor for a field. I tried QR&R and empty cache & hard reload.

image

UI code:

<div class="col-xs-12 col-sm-8 detail-view-field inlineEdit" type="wysiwyg" field="description">
<iframe id="description" name="description" srcdoc="" style="width:100%;height:230px"></iframe>
<div class="inlineEditIcon col-xs-hidden">
<span class="suitepicon suitepicon-action-edit"></span>
</div>
</div>