How To Replace the Salesforce Rich Text Editor
The Salesforce.com default rich text editor is missing some key functions that users are used to having when working with a WYSIWYG editor. Adding and editing tables, adjusting font colors, setting background colors, and editing source code are a few examples of the limitations of the default editor. When working on implementations of Salesforce.com it is not an uncommon requirement to swap out the default editor with one that offers more functionality.
Their are a number of very good open source editors available to download. CkEditor (replaced FckEditor) is my personal favorite. The editor is fast, reliable, customizable, and feature rich. In the code example below I will demonstrate on how you can replace the default editor on a visualforce page with just three lines of code.
Prerequesites
- Download CkEditor from CkEditor.com
- Upload the downloaded .zip file as a Static Resource named "CkEditor" in your SFDC org.
Source Code
|
1 2 3 4 5 6 7 8 9 10 11 |
<apex:page>
<!-- Add the javascript file to intialize the CkEditor -->
<apex:includescript value="{!URLFOR($Resource.CkEditor, 'ckeditor/ckeditor.js')}" />
<!-- Add a style class of "ckeditor" to all text area inputs -->
<apex:inputtextarea value="{!YourVariable}" styleClass="ckeditor" richtext="false"/>
<apex:inputtextarea value="{!YourVariable2}" styleClass="ckeditor" richtext="false"/>
</apex:page> |
Live Demo
-
SFDC Dev
-
Aharon Feinstein
-
http://macscloud.com/ Mac Anderson
-
num5labonte
-
http://www.macscloud.com Mac Anderson
-
Venkatyeruva
-
http://macscloud.com/ Mac Anderson
-
Kaveh
-
http://free-12415f14c3a-124e539428a-12e57456865.sachin.cs5.force.com/temp_user?id=UsN-0022-A Sachin Agarwal
-
http://macscloud.com/ Mac Anderson
-
Damian
-
http://macscloud.com/ Mac Anderson
-
Anonymous
-
swimmingly
-
Svg 4141
-
http://twitter.com/imPhaniraj phaniraj nadiger
Mac Anderson

Salesforce.com Technical Architect, with experience developing custom applications on the Force.com platform as well as large enterprise implementations of both Sales and Service Cloud (CRM).
GitHub Projects






