The problem comes from the "Visibility" switch which automatically directs to the WYSISYG mode.
The line for the WYSIWYG option was making it selected if the format was HTML. This was incorrect, and I changed to be selected if the format is WYSIWYG. I also put back the unconditional call to switchFormat(), because it was needed to call up CkEditor for HTML or WYSIWYG mode.
The line for the WYSIWYG option was making it selected if the format was HTML. This was incorrect, and I changed to be selected if the format is WYSIWYG. I also put back the unconditional call to switchFormat(), because it was needed to call up CkEditor for HTML or WYSIWYG mode.