I may be missing something but I'm not able to detect a way to configure codemirror such that it would use spaces for indentation when a tabs button is used. Maybe there is a way to do it via custom keys but even so it's common enough case (since all editors have such option) to have a dedicated option for that.