Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Salesforce Rich Text Editor’s full potential

Be First!
WYSIWYG

Salesforce.com implemented CKEditor as the WYSIWYG editor of choice for their Rich Text Area fields, but as you may have noticed, the native editor doesn’t support things like direct editing of html, font sizes/styles, font colors, preview, etc…many of the cool features supported by the feature-rich CKEditor.  These limitations can be pretty frustrating, especially when you’re trying to build a legit blogging application on the platform.  Being a nosy developer, I decided to see what Salesforce was doing with CKEditor and whether it was feasible to override the control for our purposes at Mavens.  Here’s what I found:

<iframe
src="/apexpages/fckeditor/editor/fckeditor.html?InstanceName=00N30000006XBysEAG&Toolbar=SalesforceBasic">
iframe>

You'll notice the "&Toolbar=SalesforceBasic" url parameter at the end of the iframe's src attribute.  If you use Firebug or Chrome Developer Tools to crawl to this iframe and remove the "&Toolbar=SalesforceBasic" parameter, you'll see the Rich Text Editor refresh and voilà, the überfunctional CKEditor exposes itself!  

So what does this mean?  Simply that you can use javascript to programmatically crawl the dom to your Rich Text Editor(s) in Salesforce, modify the iframe src attribute to remove the "&Toolbar=SalesforceBasic", and you'll have a full-featured WYSIWYG control inside Salesforce.

Here's what you get when you remove the "&Toolbar=SalesforceBasic" parameter from your RTF's iframe:

Here's the love!

(1371)

Previous
Next

Leave a Reply