2009-06-20 60 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