Thursday 22 August 2013

Set the default language for CKEditor and SCAYT

In order to set the DEFAULT language and spell checker in CKEditor when using SCATY (Spell check as you type) you need to add the following in your config values


CKEDITOR.editorConfig = function (config) {
   config.language = 'en-gb';
   config.wsc_lang = "en_GB";
   config.scayt_sLang = 'en_GB';
   config.scayt_autoStartup = true;

   ...
};

Note:-

- the language is en DASH gb (all lower)
- the wsc_lang and scayt_sLang is en UNDERSCORE upper GB

Monday 19 August 2013

Git and mark as assume-unchanged

I'm working on a small side-project that is on a public GIT repository and there are a few settings that should not be seen or used by other people.

Some settings that I do not want to show are:-

  • Connection strings
  • Meetup API keys

One great way to get around this is two first create the app.config and blank out the values you don't want. Then commit and push to your remote repository. After which key in the following command:-

git update-index --assume-unchanged [fileName]

Git will then stop monitoring changes to that file allowing you to put the real config info into it without fear of checking it in. If you later make changes that you DO want to check in you can run:

git update-index --no-assume-unchanged [fileName]

Lovely!