FCKeditorのShift_JIS化
html中のフォームでのWYSIWYG化のエディターFCKeditorにおける、文字コードがUTF-8でないサイト(大抵Shift_JIS)のための変更点。
- htmlをShift_JISで書く。
<meta http-equiv="Content-Type" content="text/html;charset=Shift_JIS">
を忘れずに。
- editor/lang/ja.js を元に editor/lang/ja-sjis.jsを作成
- JavaScript中で、以下を記述。
var oFCKeditor = new FCKeditor('MyTextarea');
oFCKeditor.AutoDetectLanguage = false;
oFCKeditor.DefaultLanguage = "ja-sjis";
このあと、FCKeditor#Create()なり、FCKeditor#ReplaceTextarea()を実行する。