Opened 17 years ago
Closed 17 years ago
#1778 closed Bug (invalid)
Editor doesn't load if fckeditor.js included at end of page
Reported by: | realityloop | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.5.1 |
Keywords: | Pending | Cc: |
Description
If you include the fckeditor.js at the end of your webpage, the toolbar doesn't load.
Is there any way to fix this?
Reason: According to "Exceptional Performance : Best Practices for Speeding Up Your Web Site" it is better to put Scripts at the bottom of your page to increase speed of page rendering at client end. http://developer.yahoo.com/performance/rules.html#js_bottom
Change History (4)
comment:1 Changed 17 years ago by
Keywords: | Pending added |
---|
comment:2 Changed 17 years ago by
For a quick and easy way to replicate it, open:
_samples\html\sample01.html
and move the following line:
<script type="text/javascript" src="../../fckeditor.js"></script>
To the following position in the HTML structure:
<script type="text/javascript" src="../../fckeditor.js"></script>
</body>
</html>
comment:3 Changed 17 years ago by
oops I've just tested this with sample02.html, which is closer to my actual setup, and found that it is working as expected.
comment:4 Changed 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
If the fckeditor.js file is placed at the bottom of the page, the "FCKeditor" class will not be available in the script blocks present before of it. So, it is wrong to move it to the bottom of the page in cases like sample01.html.
To properly do that, you need do wait for the window.onload event to use the FCKeditor class. This is done in sample02.html.
Could you please specify where do you place the code exactly? Could you also write if only the toolbar isn't loading or did you mean that FCKeditor doesn't load at all. This probably is a code syntax issue so maybe you could attach the code, than it would be easier for us to determine what causes the problem.