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
Post a Comment