Skip to main content

Salesforce.com ckeditor WYSIWYG

I ran across Dan Peter’s blog  when I was trying expand on the Salesforce Rich Text Field WYSIWYG and I noticed that if you use firebug and look at the iframe used for the WYSIWYG editor there is a parameter in the url, “&Toolbar=SalesforceBasic” that if you REMOVE it, it will unleash additional functionality from the CKeditor. (see image)

I created some javascript that will do this automaticaly and the only thing you have to do is replace the iframe id i used, “textAreaDelegate_Content__c___Frame“ with your iFrame id.


<apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js">  
   <script>
  
    //Removing the &Toolbar=SalesforceBasic url parameter from the iFrame Source  
    $(document).ready(function(){  
     var richtextid = '[id$=textAreaDelegate_Content__c___Frame]';  
     var iframesrc = jQuery(richtextid).attr("src").replace('&Toolbar=SalesforceBasic','');  
     jQuery(richtextid).attr("src",iframesrc);  
    });  
   
</script>  
</apex:includescript>

Have fun but please use with caution as this is a hack…but it does work.

Comments

Popular posts from this blog

Override Name in the Salesforce Cloud Console

Service Cloud Console HyperLink Opens new window outside of the console, Opens new tab inside the console. HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcUp('/" & Id & "?isdtp=vw');}"+ " else {window.location.href='/" & Id & "'}", User__r.FirstName + ' ' + User__r.LastName, "_self" ) Checks if the srcUp exists and if it does, you're in the console.