The WYSIWYG HTML Editor allows users to format text in CRM fields that will be displayed on the portal without HTML tags. This feature is implemented using JavaScript on form load. This means that even though a field has been specified to use the WYSIWYG HTML Editor, the feature is only applied to the field on that particular form. For example, if a client has two Meeting forms and wants the WYSIWYG HTML Editor on the "Description" field, it will have to be applied on both forms. Some fields may be set up with this when you first access your system. For others you will need to add it using the steps below.
In the Form Libraries section of the Event Tab, add Cobalt's CRMUiUtility (cobalt_/Scripts/CrmUiUtility.js).
Select the cobalt_/Scripts/CrmUiUtility.js in the look up and click Add.
In the Event Handlers Section of the Event Tab (under Form Libraries), set Control to Form and Event to Onload
Click Add to add the CreateTextEditors Function and complete the fields as you see below.
- Library: cobalt_/Scripts/CrmUiUtility.js (should already be filled in for you)
- Function: CreateTextEditors
- Enabled: Yes (check box)
- Parameters: "schemaname1","schemaname2"
- Pass execution context as first parameter: Yes (check box)
*Note schema name is just a place holder in this example you will need to have the schema name for the field where you want the editor to be. For example, "cobalt_description" You do not need to have more than one field with the editor, but if you want one you must separate them with a comma as you see in the example.
Find the Field Schema Name by double clicking on the field in the form editor.
Click the Details Tab. The Schema name is in the Name Field.
This is what you want to put into the paramaters "schemaname" in the step above.
Click Ok to close the Form Properties pop up.
Click Save to save changes and then Publish to make changes available.
**Note** If you do not see the WYSIWYG as pictured above you may have Legacy Form Rendering on and will need to turn it off.
2. On the General Tab Scroll down to "Use legacy form rendering" and set this to No
You may need to log out and back in to see the changes after this, but when you go back to the checking the entity form step above the WYSIWYG should display.
**Note** - If your description is not showing up on the portal, check the source code of your text.
The WYSIWYG does not accept html from word formatting. If this is the case, you will see an "MsoNormal" tag inside your code. You will need to remove this in order to have the description appear on the portal. Usually you will see this if you have copied and pasted the text from Word. So the best practice would be to type your information directly into the field. Or if you must copy and paste use a text document like Notepad.