+ Start a Discussion
Howard WeinsteinHoward Weinstein 

how did disableNativeSpellChecker : true, get into my Visualforce page

I am trying to figure out how this line got in my visualforce code. The issue is it is disabling the native spellchecker in my browser which I need it to work. I can't find it in any of my pages or my static resources so I am unclear on how it is getting into my VFpage. I can only see it when I view the page source in my browser

At the start of my pages I am adding these items in not sure if this is what is causing it

<apex:stylesheet value="{!$Resource.jqueryUI}" />
<apex:stylesheet value="{!$Resource.Reset}" />
<apex:stylesheet value="{!$Resource.Rms}" />
    <apex:includeScript value="{!$Resource.jquery}"/>  
   <apex:includeScript value="{!$Resource.Common}"/>    
   <apex:includeScript value="{!$Resource.jquerymigrate}"/>    
    <apex:includeScript value="{!$Resource.jquerymin}"/>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>  

var editor = CKEDITOR.replace('j_id0:j_id1:j_id46', { removePlugins : 'elementspath,maximize,image,tabletools,liststyle,contextmenu,resize', baseHref : protocolAndHost + '/EMReview/ckeditor/ckeditor-4.x/rel/', customConfig : '/EMReview/ckeditor/ckeditor-4.x/rel/sfdc-config.js', height : '200', bodyId : 'j_id0:j_id1:j_id46_rta_body', toolbar : 'Visualforce', sfdcLabels :{CkeMediaEmbed : { iframeMissing : 'Invalid &lt;iframe&gt; element. Please use valid code from the approved sites.', subtitle : 'Paste &amp;lt;iframe&amp;gt; code here:', description : 'Use &lt;iframe&gt; code from DailyMotion, Vimeo, and Youtube.', title : 'Embed Multimedia Content', exampleTitle : 'Example:', example : '\n \n &lt;iframe width=\&quot;560\&quot; height=\&quot;315\&quot; src=\&quot;https://www.youtube.com/embed/KcOm0TNvKBA\&quot; frameborder=\&quot;0\&quot; allowfullscreen&gt;&lt;/iframe&gt;\n \n '}, CkeImagePaste : { CkeImagePasteWarning : 'Pasting an image is not working properly with Firefox, please use [Copy Image location] instead.'}, CkeImageDialog : { infoTab_desc_info : 'Enter a description of the image for visually impaired users', uploadTab_desc : 'Description', defaultImageDescription : 'User-added image', uploadTab_file_info : 'Maximum size 1 MB. Only png, gif or jpeg', uploadTab_desc_info : 'Enter a description of the image for visually impaired users', imageUploadLimit_info : 'Max number of upload images exceeded', btn_insert_tooltip : 'Insert Image', httpUrlWarning : 'Are you sure you want to use an HTTP URL? Using HTTP image URLs may result in security warnings about insecure content. To avoid these warnings, use HTTPS image URLs instead.', title : 'Insert Image', error : 'Error:', uploadTab : 'Upload Image', wrongFileTypeError : 'You can insert only .gif .jpeg and .png files.', infoTab_url : 'URL', infoTab : 'Web Address', infoTab_url_info : 'Example: http://www.mysite.com/myimage.jpg', missingUrlError : 'You must enter a URL', uploadTab_file : 'Select Image', btn_update_tooltip : 'Update Image', infoTab_desc : 'Description', btn_insert : 'Insert', btn_update : 'Update', btn_upadte : 'Update', invalidUrlError : 'You can only use http:, https:, data:, //, /, or relative URL schemes.'}, sfdcSwitchToText : { sfdcSwitchToTextAlt : 'Use plain text'}}, contentsCss: ['/ckeditor/ckeditor-4.x/rel/contents.css', '/EMReview/sCSS/35.0/sprites/1444933246000/Theme3/default/base/CKEditor.css'], disableNativeSpellChecker : true,
James LoghryJames Loghry
Somebody put it there either on purpose or through accidental copy and paste.
@James Loghry put it where? I can only see it in the source of the html page I have looked at all the static resoources and in my visualforce pages and classes and there is nothing in those pages related to the CKEditor?
James LoghryJames Loghry
Howard, the way you posted the code above, it looked like it was actually in your Visualforce page's markup, and not in the source.  

Salesforce brings in several libraries to help with various aspects, such as date time pickers for date time fields, jquery for javascript functionality, etc.  

It's likely you're seeing an artifiact of that.  CKEditor itself is a rich text javasript library.  Are you using any rich text fields in your Visualforce page, or perhaps brining in the CKEditor with one of your static resources and not realizing it?

There's likely a way to work around it with some javascript magic, but it depends on how your spellchecker library is instanciated, etc.
Howard WeinsteinHoward Weinstein
@James Loghry yes I am using richtext inputtestarea but not sure why or where the CKEditor is coming in becuase I searched all my static resources and see no specific references in the jquery or other files that say CKEditor. Any idea what file I should be looking for? I am also using the Saleforce Sites to put my pages on the internet so not sure if that has anything to do with it as well.
Thank You
So it turns out that it was nothing to do with my code or static resources but actually salesforce itself blocks any native spell checking for a rich text field. Not sure why it would do that but it does. I found some answers from others who ran into the same issue with some script that is supposed to override the issue but not able to get it to work yet. Clearly this is a case where Salesforce did not get the functionality right. Disabling the native spellchecker in the browser makes no sense.