![](/img/trans.png)
[英]jqueryui dialog missing title bar, “x button” and surround dialog box
[英]title bar is missing in YUI
我在网站上使用的是YUI Rich Text编辑器。 我正在使用来自Google的加载JavaScript进行加载。 当我尝试创建一个链接(或创建一个“设置”框中的任何其他行动,标题栏缺失,看到这里的图片 ,你可以看到它应该在看这里在雅虎网站YUI。
我在<head>
-tag中使用以下代码:
<!--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>
我从YUI RTE的开发者之一David Glass得到了一些帮助。 我犯的错误实际上是CSS问题,在我的CSS文件中的某行中,显示“ h3 {visibility:hidden;}”的行导致了此错误。 无论如何,谢谢您的帮助!
尝试强制使用自己的编辑器标题:
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();
我在这里可能是错的,但是由于SOP (相同原产地政策),我认为Google托管的JavaScript不能修改DOM(除非您是google)。
尝试将JavaScript放置在Web服务器中并从那里链接:
<script type="text/javascript" src="http://your.web.server.com/yui/2.7.0/build/yuiloader/yuiloader-min.js"></script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.