2009-06-20 63 views
0

我在我的網站上使用YUI Rich Text編輯器。我使用來自Google的加載JavaScript加載它。當我嘗試創建一個鏈接(或創建一個「設置」框中的任何其他行動,標題欄丟失,請參閱picture here。你可以看到它是如何應該過目here在雅虎網站YUI。標題欄在YUI中丟失

我「M使用在<head> - 標籤驗證碼:

<!--Include YUI Loader: --> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader-min.js"></script> 
<!--Use YUI Loader to bring in your other dependencies: --> 
<script type="text/javascript"> 
// Instantiate and configure YUI Loader: 
(function() { 
    var loader = new YAHOO.util.YUILoader({ 
     base: "http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/", 
     require: ["editor"], 
     loadOptional: true, 
     combine: false, 
     filter: "MIN", 
     allowRollup: true, 
     onSuccess: function() { 
      var Editor = new YAHOO.widget.Editor('content', { 
       height: '300px', 
       width: '802px', 
      dompath: true, //Turns on the bar at the bottom 
      animate: true //Animates the opening, closing and moving of Editor windows 
      }); 
      Editor.render(); 
    }  
});  

// Load the files using the insert() method. 
loader.insert(); 
})(); 
</script> 

而且在我的網頁:

<div class="sIFR-ignore yui-skin-sam"> 
    <textarea name="content" id="content" cols="50" rows="10"> 
    </textarea> 
</div> 

回答

1

我從大衛玻璃的一個一定的幫助YUI RTE的開發者。我所做的錯誤實際上是一個CSS事物,在我的CSS文件中,它是一行讀取「h3 {visibility:hidden;}」的行,導致此錯誤。任何如何,感謝您的幫助!

-1

我可能是錯在這裏,但由於SOP(同源策略),我不認爲JavaScript託管的JavaScript將能夠修改DOM(除非你是谷歌)。

嘗試放置的JavaScript在您的Web服務器和鏈接從那裏:

<script type="text/javascript" src="http://your.web.server.com/yui/2.7.0/build/yuiloader/yuiloader-min.js"></script> 
+0

srry ..你錯了 – Evert 2009-06-20 21:19:03

0

試着強迫自己標題爲編者:

var Editor = new YAHOO.widget.Editor('content', { 
       height: '300px', 
       width: '802px', 
      dompath: true, //Turns on the bar at the bottom 
      animate: true //Animates the opening, closing and moving of Editor windows 
      }); 
      Editor._defaultToolbar.titlebar="<b>Use my title</b>"; 
      Editor.render(); 
+0

這沒有什麼區別:( – Zyberzero 2009-06-25 21:52:49