FCKeditorのShift_JIS化

html中のフォームでのWYSIWYG化のエディターFCKeditorにおける、文字コードUTF-8でないサイト(大抵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()を実行する。