Yui에는 타이틀 바가 누락되었습니다
-
06-07-2019 - |
문제
내 사이트에서 Yui Rich 텍스트 편집기를 사용하고 있습니다. Google의로드 JavaScript를 사용하여로드하고 있습니다. 링크를 만들려고 할 때 (또는 "설정"상자를 생성하는 기타 작업, 제목 표시 줄이 누락되었습니다. 여기 그림. 당신은 그것이 어떻게 바라보아야하는지 알 수 있습니다 여기 Yui의 Yahoos 사이트에서.
이 코드를 사용하고 있습니다 <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>
해결책
Yui Rte의 개발자 중 한 명인 David Glass의 도움을 받았습니다. 내가 한 오류는 실제로 CSS 일이었습니다. 도와 주셔서 감사합니다!
다른 팁
편집자를위한 자신의 타이틀을 강요 해보세요 :
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();
나는 여기서 틀렸을 수도 있지만, 때문일 수 있습니다 예규 (동일한 원산지 정책) Google에서 호스팅 된 JavaScript가 Google이 아닌 한 DOM을 수정할 수 없다고 생각합니다.
웹 서버에 JavaScript를 배치하고 거기에서 연결해보십시오.
<script type="text/javascript" src="http://your.web.server.com/yui/2.7.0/build/yuiloader/yuiloader-min.js"></script>
제휴하지 않습니다 StackOverflow