これが私のコードの問題のある部分です.each(function(){});内で実行します
$('img','<div>'+ed.selection.getContent({format: 'html'})+'</div>').each(function(){
$img=$('<img/>').attr('src',$(this).attr('src'));
alert($('<p>'+$img+'</p>').html());
if ($(this).attr('height').length>0){
$img.attr('height',$(this).attr('height'));
}
if ($(this).attr('width').length>0){
$img.attr('width',$(this).attr('width'));
}
alert($img.html());
});
まず、選択した tinyMCE コンテンツを html 形式で操作していますが、これは jQuery が適切に認識するので問題ありません。$img.html() は、未定義ではなく空白の空の値を返します。FF 3.6 と IE8 の両方をテストしました。誰か説明してくれませんか?