Firefoxのfckeditorで問題が発生しています。ユーザーがページに移動すると、html(エンコードされた)は非表示の入力要素に保存されます。事前定義されたfckeditorjavascriptイベントを呼び出して、非表示のContentBody要素からのhtmlをエディターに入力します。
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.InsertHtml("");
var sample = document.getElementById("ContentBody").value;
editorInstance.InsertHtml(sample);
}
これにより、IEではエディタに目的のテキストが自動的に入力されますが、Firefoxでは入力されません。Firebugは私にエラーを与えます:
Aはnullです[このエラーを中断します]varFCKW3CRange = function(A){this._Docume ... eateFromRange(this._Document、this);}}; \ r \ n
Firebugを使用すると、Firefoxを使用しているときにイベントメソッドFCKeditor_OnComplete()が起動されないことがわかります。ただし、IEではあります。これを両方のブラウザで機能させる方法についてのアイデアはありますか?
ContentBodyのHTMLは次のとおりです。
<input type="hidden" name="ContentBody" id="ContentBody" value="<%=Model.Article%>" />