0

I am working with SharePoint 2013 client-side from the browser. I am using the button from the toolbar. If I specify a class within tags it is noted as a spelling error on publish or check-in. The application actually updates the code to show the red underline at the point of error. These changes to the code save with the file. Therefore my simple .class becomes .<ungodly length of <span style=""> chain>class. How do I avoid this 'feature'?

2
  • What browser are you using?
    – lazoDev
    Sep 15, 2014 at 18:12
  • IE9 on a managed system.
    – EFH
    Sep 16, 2014 at 11:48

3 Answers 3

1

Try using a regular text file for your code and save it in a Document Library instead. Then, use the link reference in the CEWP to the txt file in you library. I have found this to work much better than using the HTML editor.

3
  • Going to give it a test. I'll select this answer upon a successful test case. Thank you. I need externalize all the CSS I can any way!
    – EFH
    Sep 16, 2014 at 11:52
  • I met success and can now modify one file and reference several times when running parallel test setups.
    – EFH
    Sep 16, 2014 at 15:15
  • Glad it worked well for you! Best of luck!
    – lazoDev
    Sep 16, 2014 at 15:38
1

I moved the style tag from the "Content Editor" web part to a "Script Editor" web part. Now the spell checker counts the right number of spelling errors and do not mess up my code.

1
  • Just wanted to chip in that this solution was the best option for me - thanks! Oct 9, 2017 at 15:47
0

I found a work around.

Save the file from the browser. This does not trigger the spellcheck. Then navigate to the page and you are prompted with a header that the page is visible only to you and needs to be checked in. Check it in here and the spellcheck is not triggered. Then you will get a nag message about it not being published. Again, publish it via the header link and you need not worry about the code being butchered.

2
  • The link to an external file seems much more elegant than this mess.
    – EFH
    Sep 16, 2014 at 11:51
  • It is, also, the HTML editor in the CEWP removes all whitesapce making it difficult to make changes. At least it does in 2010 (not sure about 2013). With the external file, it also makes it easier to use it in different pages as well. You can store all of your external files in the DL and reference them to any page with the URL link in the CEWP.
    – lazoDev
    Sep 16, 2014 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.