問題是在使用Internet Explorer(7或8)運行時,WordPress上的TinyMce庫存在問題。IE中的tinyMce setcontent問題
當我添加內容(如「<h1> hey </h1>
」)時,它將Firefox/Chrome中的內容添加到正確的位置,但在IE中,它添加到頁面的開始處(首要內容)。
下面是代碼我使用
變種TXT = "<h1> hey </h1>"
;
var ed = tinyMCE.getInstanceById(domElementId); // domElementId is the div ID for the textarea where i am adding the content. ed.selection.setContent(txt);
任何人都可以建議可能是什麼原因/修復?謝謝。
沒關係。我發現我不需要選擇實例。 ed.setContent()的作品。 – sbr 2011-03-01 21:43:28